A US federal appeals court has refused to lift a temporary block on president Donald Trump’s revised travel ban.

The Virginia-based court said the president’s broad immigration power was “not absolute” and the ban “intended to bar Muslims from this country”.

The decision upheld a lower Maryland court ruling that found the ban violated constitutional rights.

The justice department said it would now seek a Supreme Court review of the appeals verdict.

Attorney general Jeff Sessions said the verdict thwarted Trump’s effort to protect US national security.

The president’s revised executive order would have placed a temporary ban on people from six mainly Muslim countries and the refugee programme.

The controversial ban, which was initially imposed in January but only took effect for seven days in the face of widespread opposition, has prompted protests and debate across the US.

The US government argues federal immigration laws grant the president broad powers to stop foreigners from entering the country.

But Chief Judge Roger L Gregory, who wrote the majority opinion for the Fourth Circuit Court of Appeals, said yesterday that Trump’s powers had limits.

“It cannot go unchecked when, as here, the president wields it through an executive edict that stands to cause irreparable harm to individuals across this nation,” said Judge Gregory.

The court added that the government’s national security argument was a “secondary justification for an executive order rooted in religious animus and intended to bar Muslims from this country”.

The decision means citizens from Iran, Sudan, Somalia, Yemen, Syria and Libya can continue travelling to the US.

The 10-3 ruling is the latest in a series of legal setbacks for an order the president insists is needed to stop terrorists from entering the country.

Sessions said Trump was abiding by the US constitution and was doing his “duty to protect our communities from terrorism”.

“This Department of Justice will continue to vigorously defend the power and duty of the executive branch to protect the people of this country from danger,” he added.