Gibraltar said the decision was made after it received formal written assurances from Tehran that the ship would not discharge its cargo in Syria, the BBC reported.
Grace 1 tanker was detained by authorities in Gibraltar on July 4 with the help of Royal Marines on the suspicion that it was ferrying over 2 million barrels of crude oil to Syria in breach of European sanctions. The move triggered a standoff with Tehran.
Gibraltar's Chief Justice Anthony Dudley said that no US application was currently lying before the court.
At an earlier hearing, Gibraltar Attorney General Joseph Triay said the US Department of Justice had applied to have the ship seized, media reports said.
Confirming that the tanker had been "released from detention", Gibraltar's Chief Minister Fabian Picardo said that the US Justice Department had requested that a "new legal procedure for the detention of the vessel should be commenced".
"That is a matter for our independent Mutual Legal Assistance authorities who will make an objective, legal determination of that request for separate proceedings," he added.
Picardo said the vessel was no longer covered by EU sanctions, therefore there was no reason for the ship to be detained, media reports said.
A spokesman for Gibraltar government said that police proceedings against all four members of the crew, including the captain - an Indian national - had ended, the BBC reported.
The seizure of the tanker in July led to reprisals by Tehran, including the capture of the British-flagged Stena Impero in the Gulf.
"We have reason to believe that the Grace 1 was carrying its shipment of crude oil to the Baniyas Refinery in Syria," Spain's acting Foreign Minister Josep Borrell said at the time, adding that the US had asked the UK to intercept the ship. Gibraltar is an British overseas territory on the edge of southern Spain.
Both incidents fuelled worsening hostilities between Iran and the West that began when the US pulled out of an international agreement curbing Iran's nuclear programme in 2018 and reimposed economic sanctions.
Last week, the UK announced it would join a US-led taskforce to protect merchant ships travelling through the key shipping route in the Strait of Hormuz.
( With inputs from IANS )