The move came despite USA objections and appeals.
Iran called the detention of the Grace 1 an "illegal interception" staged by the United States, while Washington cheered it as "excellent news".
The oil tanker, Grace 1, with more than 2 million barrels of oil aboard and $995,000 are subject to forfeiture based on a complaint by the U.S. Government.
Elsewhere in his comments, Larijani pointed to the recent release of an Iranian supertanker seized by British marine forces in Gibraltar last month and said the incident showed Iran's power and resistance.
The move comes just a day after a Gibraltar judge had allowed the release of the detained vessel despite United States legal attempts to withhold it.
Pointing to Britain and US' organizing of a coup on August 19, 1953 which overthrew Mosaddegh's legitimate government, Larijani said that today's power of Iran can not be compared to the past and that enemies had no other choice but to withdraw from their act of piracy.
The lawyer said the tanker had been due for repairs in Gibraltar even before it was seized and its detention impeded the replacement of parts, making the tanker unfit for an immediate long voyage. "The burden to prove forfeitability in a civil forfeiture proceeding is upon the government", according to the Justice Department.
The developments come against the backdrop of a risky spike in tensions with Tehran, as Washington slapped crippling sanctions on the Middle Eastern nation after ditching the 2015 Iran nuclear deal, commonly known as the Joint Comprehensive Plan of Action, last year, stopping billions of dollars in business deals and largely halting the sale of Iranian crude oil internationally.
The detention of the tanker saw Iran later seize the British-flagged oil tanker Stena Impero, which remains held by Iran.
The whereabouts of the crew, none of whom are Iranian, were not immediately known.
On Thursday, Washington threatened a visa ban on the crew of the tanker. A handful of men could be seen on the deck, some looking through binoculars. At the time, the move heightened tensions and boosted oil prices. In May, the Justice Department said it had seized a North Korean cargo ship used to supply coal to the isolated nation in violation of worldwide sanctions. By withdrawing from it, he unilaterally reimposed USA sanctions against Iran, hobbling its economy in a so far unsuccessful effort to force Iran to negotiate a new deal. It seeks the seizure of the ship, the forfeiture of the 2.1 million barrels of oil it is carrying and the sum of $995,000 on the grounds that the shipment violates US sanctions against Syria and also Iran.
Resolving the tanker dispute would help Britain's Johnson focus on domestic issues as he works to complete Britain's exit from the European Union and prepare for anticipated national elections in the next few months.
"It can not be that the Strait of Hormuz is free for you and the Strait of Gibraltar is not free for us".
Although Iran claimed the ship had violated "international maritime rules", the seizure of Stena Impero was widely believed to be an act of retaliation.