Ministers on Britain's National Security Council have been advised there is still a "25%-50% chance" that the nuclear stand-off with Iran could result in a military conflict, the Guardian has been told.

The risk assessment by the Foreign Office and MI6 reflects anxiety in Whitehall about the prospect of an attack from Israel, which has longstanding fears over Tehran's nuclear weapons ambitions.

This has also been causing consternation at the Ministry of Defence. The chief of the defence staff, General Sir David Richards, has been refining and updating a range of contingency plans for any potential British involvement either before or after an attack.

Although senior officers and defence officials admit privately they have "no appetite" for involvement in any campaign, and believe it can be avoided, they are aware of the political realities. The UK and the US have stated explicitly that they do not want Iran to have a nuclear bomb. "If America wants British help, it is difficult to imagine David Cameron saying 'no'," said one source.

Ministers have also been told the US appears to have been stockpiling fuel and other defence equipment at its bases in the Gulf, in a slow and discreet build-up that has been continuing for up to a year.

Although the UK regards this as pragmatic and no indicator of the likelihood of war, it has been accompanied by more obvious sabre-rattling designed to put pressure on Iran.

The US has two aircraft carriers in the region – the USS Enterprise was deployed there in the spring, though US officials played down the move, saying it was a "routine deployment".

Concern over the likelihood of a military confrontation has risen in the last 12 months. Israel fears Tehran will soon reach a point beyond which the west will be unable to stop it developing the materials it would need to build a nuclear weapon.

Though Tehran has consistently denied this is its intention, the fear in London and Washington is that Israel may launch a unilateral attack on Iran and that the US – and the UK – would be drawn in.

British officials say there is another complicating factor. Israel must weigh up whether President Obama is likely to take a harder line on pre-emptive action against Iran next year if he has won a second term.

"The Americans might hang out the Israelis to dry after the election, but not before," said a senior Whitehall source. "Obama would have to support Israel if there was an attack before November."

The US has pressed for the Royal Navy's mine-countermeasures vessels (MCMVs) to have a presence around the Strait of Hormuz, the narrow shipping lane off the coast of Iran that Tehran has threatened to close. The ships are old but could prove valuable if the waters were mined during any conflict.

The US would almost certainly want to use the American base on the British territory of Diego Garcia for long-range bombing missions, which would further link Britain to US military action in the eyes of Iran and sympathetic Arab nations.

Defence chiefs have already drawn up plans for extra protection for British troops in Afghanistan. They predict Iranian attacks on UK forces in Helmand province and on British ships in the Gulf.

Maritime security is at the low end of the spectrum in terms of British military involvement. At the other end is whether the UK would be asked by the US to contribute directly to strikes against Iran.

It is thought this would be strongly resisted by some cabinet ministers. The foreign secretary, William Hague, has insisted that all options for dealing with Iran remain on the table, but has said any military attack would have "enormous downsides".

The UK keeps two frigates on permanent duty east of Suez, and part of their current duties involves providing "reassurance" to allies in the Gulf.

At the other end of the scale, the UK regularly has at least one submarine equipped with Tomahawk cruise missiles in the region at any one time – HMS Triumph is in the region at the moment.

And there is also the capability within the response force task group (RFTG), which was established in the 2010 strategic defence and security review to respond quickly to any global events. Some of its ships were used during last year's Libya conflict.

Earlier this year Philip Hammond, the defence secretary, was asked if more British resources be sent to the region. He said they could, and referred to the RFTG.

"The UK has a contingent capability to reinforce that presence should at any time it be considered necessary to do so."

The Guardian has spoken to a number of Foreign Office and military officials in recent months, and all of them have expressed dread at the thought of a conflict with Iran.

One spoke of fear every time Obama and Cameron are left to discuss the issue and what may have been agreed. "We have our hearts in our mouth," said the source.