US President Donald Trump has signed directives to build a wall along the US border with Mexico and crack down on US cities that shield illegal immigrants, proceeding quickly on sweeping and divisive plans to curb immigration and boost national security.

The Republican president is also expected to take steps in the coming days to limit legal immigration, including executive orders restricting refugees and blocking the issuing of visas to people from several Muslim-majority Middle Eastern and North African countries including Syria, Sudan, Somalia, Iraq, Iran, Libya and Yemen.

Trump signed two executive orders during an appearance at the Department of Homeland Security, one on building a wall along the roughly 2,000-mile (3,200-kilometer) US-Mexico border and the other to strip federal grant money from "sanctuary" states and cities, often governed by Democrats, that harbour illegal immigrants.

In cities such as San Francisco local officials, often Democrats, refuse to cooperate with federal authorities on actions against illegal immigrants.

"The American people are no longer going to have to be forced to subsidize this disregard for our laws," White House spokesman Sean Spicer said.

In an interview with ABC News, Trump said construction on the wall would start within months, with planning starting immediately, and that Mexico would pay back to the United States "100 percent" of the costs.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.