Britain has rebuffed US pleas to use military bases in the UK to support the build-up of forces in the Gulf, citing secret legal advice which states that any pre-emptive strike on Iran could be in breach of international law.

The Guardian has been told that US diplomats have also lobbied for the use of British bases in Cyprus, and for permission to fly from US bases on Ascension Island in the Atlantic and Diego Garcia in the Indian Ocean, both of which are British territories.

The US approaches are part of contingency planning over the nuclear standoff with Tehran, but British ministers have so far reacted coolly. They have pointed US officials to legal advice drafted by the attorney general's office which has been circulated to Downing Street, the Foreign Office and the Ministry of Defence.

This makes clear that Iran, which has consistently denied it has plans to develop a nuclear weapon, does not currently represent "a clear and present threat". Providing assistance to forces that could be involved in a pre-emptive strike would be a clear breach of international law, it states.

"The UK would be in breach of international law if it facilitated what amounted to a pre-emptive strike on Iran," said a senior Whitehall source. "It is explicit. The government has been using this to push back against the Americans."

Sources said the US had yet to make a formal request to the British government, and that they did not believe an acceleration towards conflict was imminent or more likely. The discussions so far had been to scope out the British position, they said.

"But I think the US has been surprised that ministers have been reluctant to provide assurances about this kind of upfront assistance," said one source. "They'd expect resistance from senior Liberal Democrats, but it's Tories as well. That has come as a bit of a surprise."

The situation reflects the lack of appetite within Whitehall for the UK to be drawn into any conflict, though the Royal Navy has a large presence in the Gulf in case the ongoing diplomatic efforts fail.

The navy has up to 10 ships in the region, including a nuclear-powered submarine. Its counter-mine vessels are on permanent rotation to help ensure that the strategically important shipping lanes through the Strait of Hormuz remain open.

The Guardian has been told that a British military delegation with a strong navy contingent flew to US Central Command headquarters in Tampa, Florida, earlier this summer to run through a range of contingency plans with US planners.

The UK, however, has assumed that it would only become involved once a conflict had already begun, and has been reluctant to commit overt support to Washington in the buildup to any military action.

"It is quite likely that if the Israelis decided to attack Iran, or the Americans felt they had to do it for the Israelis or in support of them, the UK would not be told beforehand," said the source. "In some respects, the UK government would prefer it that way."

British and US diplomats insisted that the two countries regarded a diplomatic solution as the priority. But this depends on the White House being able to restrain Israel, which is nervous that Iran's underground uranium enrichment plant will soon make its nuclear programme immune to any outside attempts to stop it.

Israel has a less developed strike capability and its window for action against Iran will close much more quickly than that of the US, explained another official. "The key to holding back Israel is Israeli confidence that the US will deal with Iran when the moment is right."

With diplomatic efforts stalled by the US presidential election campaign, a new push to resolve the crisis will begin in late November or December.

Six global powers will spearhead a drive which is likely to involve an offer to lift some of the sanctions that have crippled Iran's economy in return for Tehran limiting its stockpile of enriched uranium.

The countries involved are the US, the UK, France, Germany, Russia and China. Iran will be represented by its chief negotiator, Saeed Jalili.

A Foreign Office spokesman said: "As we continue to make clear, the government does not believe military action against Iran is the right course of action at this time, although no option is off the table. We believe that the twin-track approach of pressure through sanctions, which are having an impact, and engagement with Iran is the best way to resolve the nuclear issue. We are not going to speculate about scenarios in which military action would be legal. That would depend on the circumstances at the time."

The Foreign Office said it would not disclose whether the attorney general's advice has been sought on any specific issue.

A US state department official said: "The US and the UK co-ordinate on all kinds of subjects all the time, on a huge range of issues. We never speak on the record about these types of conversations."

The Israeli prime minister, Binyamin Netanyahu, warned at the UN general assembly last month that Iran's nuclear programme would reach Israel's "red line" by "next spring, at most by next summer", implying that Israel might then take military action in an attempt to destroy nuclear sites and set back the programme.

That red line, which Netanyahu illustrated at the UN with a marker pen on a picture of a bomb, is defined by Iranian progress in making uranium enriched to 20%, which would be much easier than uranium enriched to 5% to turn into weapons-grade material, should Iran's supreme leader, Ayatollah Ali Khamenei, take the strategic decision to abandon Iran's observance of the nuclear non-proliferation treaty and try to make a weapon. Tehran insists it has no such intention.

In August, the most senior US military officer, General Martin Dempsey, distanced himself from any Israeli plan to bomb Iran. He said such an attack would "clearly delay but probably not destroy Iran's nuclear programme".

He added: "I don't want to be complicit if they [Israel] choose to do it."