After a first few weeks best remembered for accusations about intrigue with Russia, gobsmacking presidential tweets about President Barack Obama and West Wing palace intrigue, the general impression is that the Trump administration has done little but generate controversy.

But what just happened at the southern border is a success — and it’s solely the work of President Trump.

Though it received relatively little attention, a report from US Customs and Border Protection that noted a 40 percent decline in apprehensions of people illegally crossing into the country from Mexico shouldn’t be ignored. It was the lowest number in February in five years.

More important, it was the first time since the feds starting keeping these numbers in 2000 that there was a decrease in those caught in February.

What could account for such a marked decline? The answer is obvious. Mexicans and other Central Americans who seek to enter the United States illegally are aware of the election results. The inauguration of the man who not only said he would beef up border security while building a wall but also vowed to deport illegal immigrants in greater numbers than ever before was noted by potential migrants.

Rather than face the dangers of an already perilous venture with an even worse chance of being able to stay, it appears many decided not to try.

This is more than just speculation derived from statistics. The New York Times reported that interviews with those in shelters just across the border revealed many would-be migrants have decided sneaking into the United States isn’t worth the gamble, and “100 percent” say the reason is Trump.

Many Central Americans there are either going back home or have surrendered to Mexican authorities. The same tale is told at shelters for illegal immigrants inside the United States that are usually full but now sit relatively empty.

American politicians have been trying to deter illegal immigration for decades. But, aside from downturns in the US economy, nothing has worked as well as Trump’s harsh talk about a wall and deportations.

This should teach both Trump and his critics some important lessons.

Trump was scorned for what many considered, not without reason, absurd chest-thumping about a wall that Mexico will never pay for and for promoting the fantastical notion that 11 million people could be rounded up. But it’s time for even those who deplored his stands to admit they had a salutary impact on those who illegally immigrate into the United States.

For decades, migrants have continued to come here secure in the notion that they have a fair chance of evading border security and that, once inside the country, the odds favor their being able to stay. They were provided further incentive when, in recent years, Obama and even some Republicans championed plans that would, in one form or another, grant them legal status.

But Trump’s belligerent rhetoric changed all that. It doesn’t matter that it’s entirely possible that he might eventually change his mind about all of this and perhaps even grant legal status to the so-called Dreamers who came here as children. What matters is that the world knows Americans elected a president who thinks immigration is a priority issue and that he’s prepared to take action to stem the flow of illegal immigrants.

Even if you disagree about whether their presence is a problem, you have to admit his words have done more to stop illegal immigration than those of any of his predecessors.

But there’s also a lesson here for the president.

Trump may think he can tweet with impunity and, as with his assertion that Obama specifically ordered the wiretapping of Trump Tower, then try to ignore the furor he created once his charge is debunked. He may have even conditioned us to automatically assume what he says is always for momentary political advantage or entertainment value rather than the truth.

Trump will never act in the way presidents are traditionally supposed to behave, but those migrants voting with their feet should teach him the immense power of his words.

If he can learn to focus that power on his objectives rather than giving his enemies ammunition and wasting so much of it on foolish grudges and venting spleen at critics, he might achieve more successes like the one at the border.

Jonathan S. Tobin is opinion editor at JNS.org.