US President Donald Trump clenches his fist after speaking at a campaign rally for US Senator Darline Graham at Myrtle Beach Convention Center in Myrtle Beach, South Carolina, US.

A US federal judge has struck down a government ban on visas to nationals from 75 countries who wish to settle in the country indefinitely, dealing a blow to President Donald Trump's immigration crackdown.

In a ruling issued on Friday in the Southern District of New York, Judge Jeannette Vargas called the policy "contrary to law" and said Secretary of State Marco Rubio had exceeded his "statutory authority" in issuing it.

The policy, which came into force in January, suspended the processing of immigrant visas to nationals of 75 countries including Afghanistan, Brazil, Egypt, Iran, Iraq, Nigeria, Somalia, Thailand and Yemen.

At that time, the State Department had said the decision was made "to ensure that immigrants from high-risk countries do not unlawfully utilise welfare in the United States or become a public charge."