US President Donald Trump addressed a group of American sheriffs and Police Chiefs about issues relating to national security Wednesday.

President Trump said that it was within the powers of the president to restrict the immigration of anyone he or she deems to be a threat to American interests, and that the judges who questioned the legality of his executive order temporarily banning travel to the US from seven Muslim nations were wrong.

Trump also addressed his plans to build a wall on the US-Mexico border to keep out illegal immigrants, saying that he does not joke about such matters.

He compared his proposed wall to the fence Israel constructed along its southern border with Egypt.

"Just ask Israel about walls. Do walls work? Just ask Israel. They work, if it's properly done," Trump said.