* U.S. seeks to seize Iranian ship in Gibraltar
* Grace 1 was seized by Gibraltar on July 4
* Gibraltar had been preparing to free the ship
* Iran has a British-flagged vessel (Recasts lead)
By Guy Faulconbridge and Marco Trujillo
LONDON/GIBRALTAR, Aug 15 (Reuters) - The United States applied on Thursday to seize an Iranian tanker detained by Gibraltar, halting its expected release at the last minute and preventing a possible swap for a British-flagged tanker held by Iran.
The two seized tankers - an Iranian one in Gibraltar and a British one in Iran - have become pawns in the standoff between Iran and the West, with their fate tangled in the diplomatic differences between the EU's big powers and the United States.
The Iranian Grace 1 oil tanker was seized by Royal Marine commandos in a landing in darkness off the coast of the British overseas territory on July 4.
Gibraltar said the tanker was suspected of selling oil to Syria in breach of European Union sanctions. Two weeks later, Iran's Revolutionary Guards seized the British-flagged Stena Impero in the Gulf on July 19.
Gibraltar was due to release the Grace 1 on Thursday, but just hours before, the U.S. Department of Justice sought to seize it.
"The U.S. Department of Justice has applied to seize the Grace 1 on a number of allegations which are now being considered," the government of Gibraltar said, adding the matter would return to the supreme court of Gibraltar at 1400 GMT on Thursday.
Further details were not immediately released about the grounds for the U.S. Justice Department's application. The U.S. Justice Department was not immediately available for comment.
A source in Gibraltar had told Reuters ahead of Thursday's court hearing that the Grace 1 would probably be allowed to leave, stoking speculation about a possible tanker swap with Iran.
The Gibraltar Chronicle newspaper, which was first to report the news, said the court's chief justice, Anthony Dudley, made clear that were it not for the U.S. move, "the ship would have sailed".
While both Britain and Iran deny they were planning to swap the vessels for each other, there has been widespread expectation that the Britsh-flagged ship will not be freed until the Iranian tanker is released.
European countries including Britain strongly disagreed with Washington's decision last year to abandon an international agreement that guaranteed Iran access to trade in return for curbs to its nuclear programme.
Washington has imposed sanctions on Iran with the aim of halting its oil exports altogether. European countries have lifted sanctions against Iran itself but still have a ban on selling oil to Syria, in place since 2011.
Gibraltar denies that it was ordered to detain the Grace 1, which was carrying up to 2.1 million barrels of oil, but several diplomatic sources have said the United States asked the United Kingdom to seize the vessel.
Britain, which has insisted its Iran policy will not change under new Prime Minister Boris Johnson who took office last month, has repeatedly indicated it wants a compromise over the tanker.
U.S. national security adviser John Bolton visited London on Sunday to Tuesday, offering Washington's help on Britain's exit from the EU, due on Oct. 31. Britain has announced plans to join a U.S.-led maritime security mission in the Gulf.
Iranian navy commander Rear Admiral Hossein Khanzadi repeated Iran's longstanding demand that Western navies leave the Gulf, which Iran says should be patrolled only by the countries of the region.
"The enemies of the region, America, England and the Zionist regime and their allies, should know that the time of parading, loitering and putting on a hypocritical show in the Persian Gulf region and the sea of Oman is over," Khanzadi said, according to ISNA news agency.
"The enemies must leave the region as quickly as possible." (Reporting by Guy Faulconbridge; editing by Michael Holden)