The Grace 1 supertanker, carrying 2.1 million barrels of oil, was seized on July 4 as it transited through international waters off Gibraltar, which is located on Spain's southern tip.
An initial order by the court authorizing the detention of the vessel would lapse after Friday, Presstv Reported.
The court's decision came a day after a senior Gibraltar's official described as “constructive” talks with Iran, raising hopes that the tanker would be released imminently.
In a meeting in London on Thursday, Gibraltar's Chief Minister Fabian Picardo and Iranian officials “discussed matters related to the detention of Grace 1,” a spokesman for the island said.
He added that the meeting was “constructive” and “positive” as both sides sought to “de-escalate all aspects of the issues arising”.
On Friday, Picardo said, "We look forward to continuing to work constructively and positively with officials of the Islamic Republic of Iran to facilitate the release of the Grace 1 pursuant to the satisfaction of all legal requirements."
Last weekend, British Foreign Secretary Jeremy Hunt and his Iranian counterpart Mohammad Javad Zarif held a telephone conversation about the tanker.
Hunt also termed the conversation as "constructive" and promised to "facilitate" the release of the tanker "if we received guarantees that it would not be going to Syria".
The UK government, however, has so far failed to take any measures to fulfill its promise and release the tanker.
A diplomatic standoff broke out between Tehran and London after Britain’s naval forces unlawfully seized Grace 1 and its cargo in the Strait of Gibraltar.
London says the supertanker was suspected of carrying crude to Syria in violation of the European Union’s unilateral sanctions against the Arab country.
Tehran has condemned the seizure as “maritime piracy”, vehemently rejecting London’s claim that the ship had been bound for Syria.
In an interview with BBC, Zarif stressed that the Iranian ship had never been bound for Syria, but “a place in the Mediterranean other than” the Arab country.
“The UK by confiscating our ship is helping the US in imposing its illegal oil sanctions against Iran,” he said.
The confiscation reportedly took place at the request of the US as part of Washington's "maximum pressure" on Iran.
Leader of the Islamic Revolution Ayatollah Seyyed Ali Khamenei has denounced Britain’s illegal seizure of the oil tanker, warning that the act of “piracy” will not go unanswered.
“The wicked Britain commits an act of maritime piracy and steals our ship,” said Ayatollah Khamenei. “They (the British) perpetrate a crime and make it look legal.”
On July 10, Iran’s President Hassan Rouhani warned the UK about the “consequences” of its seizure of the Iranian supertanker.
“I remind to the Britons,” Rouhani cautioned, “you are the ones initiating insecurity, and will come to realize its consequences in the future.”