“We’re going to keep families together and the border is going to be just as tough as it’s been,” the president told the crowd.

President Donald Trump has attended a raucous rally to defend his hard-line immigration policies hours after signing an executive order to end the forced separations of migrant families.

Mr Trump downplayed the crisis that has threatened to envelop the White House amid days of images of children being pulled from their immigrant parents along the nation’s southern border.

He made only a brief mention of his decision to sign an executive order after spending days insisting, wrongly, that his administration had no choice but to separate families apprehended at the border because of federal law and a court decision.

“We’re going to keep families together and the border is going to be just as tough as it’s been,” Mr Trump told the cheering crowd in Duluth, Minnesota.

The order does not end the “zero-tolerance” policy that criminally prosecutes all adults caught crossing the border illegally.

But it aims to keep families together while they are in custody, expedite their cases and ask the Defence Department to help house them. It also does not change anything yet for the some 2,300 children taken from their families since the policy was put into place.

At the rally, the president denounced his political opponents and those who make unauthorised border crossings, suggesting that the money used to care for those immigrants could be better spent on the nation’s rural communities and inner cities.

“Democrats put illegal immigrants before they put American citizens. What the hell is going on?” asked Mr Trump, prompting the crowd to chant “Build the wall!”

He even invoked his campaign kick-off speech, held three years ago this week, in which he declared that Mexico “wasn’t sending their best” in terms of migrants crossing into the US.

That was not the only throwback moment at the rally, featuring a packed arena festooned with American flags and approximately 8,000 people responding in chants to many of Mr Trump’s cues.

He fumed over what he deemed “dishonest” coverage of his summit with North Korean leader Kim Jong Un and raved about the economy and his tough new tariffs meant to create fair trade.

Again attacking the special counsel’s Russia investigation as a “witch hunt,” Mr Trump went on to blast the media for focusing on the recent immigration crisis at the expense of covering what he contends is bias against him at the FBI.

He also accused the media of providing one-sided reports about his Singapore summit with Mr Kim.

“We had a great meeting. We had great chemistry,” said Mr Trump, who predicted that Mr Kim “will turn that country into a great successful country.”

“These people,” said Mr Trump, gesturing to the media at the back of the arena, “say, ‘He’s given away so much’. You know what I gave up? A meeting.”

President Donald Trump speaks at the rally in Duluth (Susan Walsh/AP)

The Duluth rally was Mr Trump’s first in a blue state since taking office.

He narrowly lost Minnesota in 2016 and with the industrial and upper Midwest looming large for Mr Trump’s re-election hopes, the president vowed to spend more time there before 2020.

“You know, I hate to bring this up, but we came this close to winning the state of Minnesota,” the president said. “And in two-and-a-half years, it’s going to be really easy, I think.”

Mr Trump was in Minnesota to back Pete Stauber, a Republican congressional candidate running in a traditionally Democratic district.

Energised by the roaring crowd in his first rally since the Singapore summit, Mr Trump soaked in the applause and caustically dismissed a few protesters who tried to interrupt.

He also mocked the idea that his opponents – whether liberals or media executives – were always called “the elite”.

“The elite! Why are they elite?” Mr Trump said. “I have a much better apartment than they do. I’m smarter than they are. I’m richer than they are. I became president and they didn’t.”