Donald Trump is betting immigrant bashing is a winning strategy.

With the midterm elections approaching, President Donald Trump clearly thinks attacking immigrants is just the ticket to whip up his base and avoid a Congressional wipe out in November.

Despite the outcry over his policy of separating children from parents at the border, or maybe because of it, Trump has amped up his anti-immigrant rhetoric in the past week. He capped it all off with a Sunday morning call to deprive immigrants at the Southern border of their due process rights.

In a pair of Sunday morning tweets, Trump called immigrants invaders. “When somebody comes in, we must immediately, with no Judges or Court Cases, bring them back from where they came. Our system is a mockery to good immigration policy and Law and Order. Most children come without parents,” Trump wrote.

Sunday morning’s tweets followed a week in which Trump, at the Nevada state GOP convention, said Democrats, “just want to use this issue — and I like the issue for [the] election, too.”

He’s not wrong. Immigration-bashing has been a successful strategy for Trump.

While the vast majority of Americans disapproved of Trump’s child separation policy — which he later altered to a policy of keeping children in detention with their parents — Republicans favor it.

Experience has shown Trump that intemperate immigration rhetoric amps up his core supporters’ passion. He started his campaign for the presidency with a vicious attack on Mexican immigrants, and despite widespread approbation, won first the Republican nomination and then the presidency over candidates with more mainstream views.

He needs the passion of his supporters to stem the possibility of a blue wave in November and is calculating that immigrant bashing is one way to get it.

Which is why he says things like, “I want border security. I don’t want to try people. I don’t want people coming in. Do you know, if a person comes in and puts one foot on our ground, it’s essentially, ‘Welcome to America, welcome to our country’? You never get them out, because they take their name, they bring the name down, they file it, then they let the person go. They say, ‘Show back up to court in one year from now.’ ”