US District Judge Derrick Watson in Hawaii said Wednesday he had turned his original temporary restraining order into a preliminary injunction.
Such an injunction generally has no set expiration date, said Hawaii state Attorney General Doug Chin.
This means Trump will be barred from enforcing the ban while it is contested in court.
Watson's first order suspending enforcement of Trump's amended ban was issued March 15, a day before the measure, which barred entry of people from six mainly Muslim countries, was to go into effect.
Trump's first ban and the revised one have both been criticized as amounting to a ban on entry of Muslims into the US.
In his first order, Watson ruled it was plausible "to conclude that targeting these countries likewise targets Islam" given their Muslim populations ranging from 90.7 per cent to 99.8 per cent.
Trump has said a travel ban is needed to preserve US national security and keep out extremists.
Related reading
Trump's team seek quick travel ban hearing