(Updates prices, adds analyst comment)

* Dollar gains across the board

* US-Iran talks in focus

* Pound recovers some losses after Starmer resignation announcement

* Yen stuck around 160 per dollar as intervention concerns mount

By Amanda Cooper

LONDON, ​June 22 (Reuters) - The dollar held ⁠firm on Monday as the first round of U.S.-Iran talks fuelled investor optimism for a peace deal while the pound recovered ‌from a brief knock after British Prime Minister Keir Starmer said he would resign and the yen neared 40-year lows. Mediating nations Qatar and Pakistan said the U.S. ​and Iran agreed to a roadmap towards a final deal to end their conflict within 60 days, which sent oil prices down 1.6% to $79.3 a barrel.

Investor concern over threats ​from ​U.S. President Donald Trump to restart the war and Tehran's announcement that it had closed the Strait of Hormuz kept crude oil losses contained.

Sterling, meanwhile, was a touch lower on the day at $1.324, having recovered from a session low of $1.318 hit after ⁠Labour leader Starmer said he would resign, opening the way for rival Andy Burnham to possibly become the country's seventh prime minister in the 10 years since the Brexit vote.

"The market is watching gilts more than the pound, and that looks quiet. The medium-term reaction is that the market is going to get nervous at some point about fiscal policy," said Kit Juckes, chief FX strategist at Societe Generale.

"It's more likely than ​anything else that sterling remains under ‌pressure as we ⁠have higher inflation, higher (interest) rates and ⁠then we wait for the next round of news."

 

YEN NEAR 40-YEAR LOW

The Japanese yen held around 161.74 to the dollar, just shy of a ​two-year low reached last week. A break beyond 161.96 would take the yen to its weakest level ‌since 1986. Japanese Finance Minister Satsuki Katayama said on Monday that authorities were prepared to respond ⁠appropriately to currency moves at any time. "The Ministry of Finance may be getting sore necks watching USD/JPY surge to the 2024 high," said Matt Simpson, senior market analyst at StoneX. "Yet they may also feel powerless to do anything about it, as intervening against the tide of a hawkish Fed and strong U.S. fundamentals could prove costly and futile." The yen has erased gains made after a round of interventions from April 30, with a shift in focus by the Federal Reserve leading traders to ramp up bets on rate increases this year, which has favoured the dollar.

CIBC head of G10 currency strategy Jeremy Stretch said that trader expectations of at least one U.S. rate increase this year mean the dollar is likely to remain firm even if the BOJ raises rates more quickly.

"It's still the case that rate spreads are ‌not particularly favourable, and if you're in a world where U.S. exceptionalism is still the watch-word, ⁠then the path of least resistance, outside of any intervention risk, would be for dollar/yen (to trade) ​higher," Stretch said.

Investors have built up bullish dollar positions in the latest week. Data from the Commodity Futures Trading Commission shows speculators now have the biggest bet on a rising dollar in 16 months, worth nearly $30 billion.

The dollar index, which tracks the U.S. currency against six others, was just below 101 ​and near its highest ‌in a year. It has risen almost 3% this year, supported in part by expectations that interest rates ⁠will stay higher for longer.