One of the Argentinian admirals who sent his country to war with Britain over the Falkland islands has admitted that he dispatched a team of saboteurs to sink a Royal Navy ship in Gibraltar.

Admiral Jorge Anaya, a former military junta member who commanded the Argentinian navy at the time of the war, said he expressly ordered the mission. It was foiled by Spanish police hours before the team planned to attach limpet mines to a British ship.

"The operation was carried out in total secrecy," the admiral told the makers of a documentary that went on show in Spanish cinemas last night.

Operation Algeciras came very close to sinking a British ship with Italian-made mines that had been brought to Spain from Argentina in a diplomatic bag.

The team arrived in Spain and based itself on the south coast near Gibraltar, where it spent almost a month eyeing possible targets and awaiting permission to attack.

Admiral Anaya said he turned down three separate requests to blow up different vessels in Gibraltar before finally giving the go ahead.

On one occasion, the team was refused permission to attack a Royal Navy transport ship and a frigate in case they spoiled talks, led by the US secretary of state Alexander Haig, to solve the crisis.

"We decided that we might stop some kind of peace agreement if we went ahead," said Maximo Nicoletti, one of the four-man team of divers who was interviewed for the documentary.

Mr Nicoletti was a former anti-government guerrilla who once blew up an Argentinian navy ship but was captured, became a military agent and was living in Miami.

A few hours after the team passed up the chance of attacking the frigate and transport ship, a British submarine sank the Argentinian cruiser General Belgrano, killing more than 320 sailors and effectively ending peace negotiations.

The team waited almost a month for another target to appear. They posed as fishermen in a small rubber dinghy as they floated off the Spanish town of La Linea, which is beside the Rock of Gibraltar.

They finally saw a Royal Navy frigate enter the harbour and agreed to strike the next day. "Our aim was to place the charges, give them time to explode, get the cars, drive to Barcelona and from there cross into France. We were going to fly back to Argentina from Italy," Mr Nicoletti said.

But when the team went to renew their car hire in the morning, they found Spanish police waiting for them.

"It was the same day that I had authorised them to go-ahead [with the attack]," said Admiral Anaya.

The divers had been given strict instructions, in the event of capture, to say that they were acting on their own initiative.

Nigel West, a British writer who specialises in covert operations, told the documentary team that Britain had known about the plot because of telephone-taps of conversations between Argentina's embassy in Madrid and Buenos Aires.

He said that, after tense discussions by the war cabinet about whether Spain could be trusted, the information was passed on to Madrid.

The documentary, however, claims that the police officers who arrested the Argentinian team had no idea who the members were, or why they were there.