JUFAIR NAVAL BASE, BAHRAIN – The scenario for naval exercises carried out off the Iranian coast earlier this month was thinly disguised. "Redland and Grunland are regional rivals," read the brief, code apparently for Saudi Arabia and Iran.

"Relations have recently degraded with aggressive rhetoric coming from both sides." Leading the way through the Strait of Hormuz was HMS Ocean, the Royal Navy's flagship until its two new aircraft carriers enter service. American and French warships sailed close behind.

Forty-five years after a withdrawal that the foreign secretary, Boris Johnson, describes as mistaken, Britain is back in the gulf. The union flag flutters over the new Juffair naval base in Bahrain. More military installations are sprouting in Dubai and Oman. Bahrain's rulers have covered their island in posters lauding "200 years of friendship and peace" with Britain. So copious are Gulf investments in London that Britain's capital is the "eighth emirate," said Johnson.

Brexit has given added impetus to Britain's renewed interest in the region. Just as it ended colonial rule of the gulf on the eve of its accession in 1973 to the European Economic Community, so now Britain is wooing old partners with a succession of visits. British forces will redeploy to Oman after they pull out of Germany in 2019. Merchants offering everything from weapons to sand for golf bunkers have made the gulf Britain's largest export market after the E.U. and America. London fund managers play on jitters over gulf stability to attract locals' wealth. Such landmarks as the Shard, the Olympic Village and Harrods — all Qatari-owned — are testaments to their success. Even City Hall, the seat of London's mayor, belongs to Kuwait.

Britain's pretensions can seem overblown. Behind the hype, the Juffair base amounts to little more than a pier inside the sprawling base of America's Fifth Fleet. Britain's flotilla of seven warships in the gulf looks puny next to America's 40, complete with nuclear-powered aircraft carriers with decks the area of three football fields.

On his last visit to Bahrain as defense secretary, Ash Carter seemed to scoff at suggestions that Britain might replace a wary America. "There aren't any good alternatives," he said.

That said, potentates who bridled at the restrictions the Obama administration placed on arms exports find Britain's government less persnickety. It licenses arms exports to all gulf regimes and supports their forces of law and order (in 2015 a stink about a contract between Britain's justice ministry and the Saudi prison service led to the deal's cancellation). BAE Systems, an arms manufacturer, is one of Saudi Arabia's largest private-sector employers. Activists have gone to court in Britain to challenge the legality of over $4.1 billion of arms sales to Saudi Arabia since the onset of its Yemen war in March 2015.

With Iran across the water, many gulf leaders seem happy to pay for British protection. Indeed, many trained at Britain's military college, Sandhurst, before Britain backed their succession. Oman's sultan, Qaboos bin Said al-Said, served with the Scottish Rifles in Germany.

But Britain also risks making enemies. Oman-watchers in London fear for their relationship (and the defense contracts) when the ailing sultan dies.

"Money plowed into arms deals should be spent internally. The security challenges the gulf faces are internal, not external," said an Omani official. Britain's role as protector of Bahrain's king infuriates the island's suppressed Shias. "Of all the main Western embassies, only Britain keeps its distance," said a Shia elder. Abu Taqi, the father of a stone-thrower who was shot dead, curses Britain for befriending Bahrain's rulers.