The dollar softened on Friday as signs emerged ​of possible peace talks between the U.S. ⁠and Iran, but headed for its first weekly gain in close to a month as investors remained nervous over the situation in the Middle East.

The dollar ‌had been trading around flat in early trading but later in the European session it softened more and was last down 0.23% at $98.595.

Brent crude futures turned negative in early afternoon trade in Europe ​after a Pakistani government source said Iranian Foreign Minister Abbas Araqchi was expected to arrive in Islamabad on Friday night with a small team and peace talks with the U.S. were likely to take ​place.

While ​Lebanon and Israel extended their ceasefire for three weeks ahead of its expiration on Sunday, Iran showed off its control over the Strait of Hormuz by releasing footage of its commandos storming a huge cargo ship, leaving the timing of the reopening of the world's most important shipping corridor uncertain and keeping oil ⁠prices elevated.

The euro was 0.3% higher at $1.1172.

Sterling edged 0.2% higher, with stronger-than-expected UK retail sales for March barely moving the needle.

"If you look at the last week the major theme is just that there's no real progression with peace talks. For markets, it's difficult when there's no deadline," Tommy Von Brömsen, FX strategist at Handelsbanken in Stockholm, said.

The dollar has drawn safe-haven demand amid the uncertainty. It gained ground in March as concerns over the conflict deepened, but gave back some of those gains this month as optimism over ​a potential resolution grew.

Meanwhile, the yen ‌gained after four ⁠days of losses, rising 0.2% to 159.4 ⁠per dollar.

CENTRAL BANK BONANZA LOOMS

Traders are looking ahead to a central-bank-heavy week next week, with the Bank of Japan, the European Central Bank, the Bank of England and the Federal ​Reserve among those due to deliver policy decisions.

"The main message from the central banks is that they are - so far at least - ‌in a kind of 'wait-and-see' approach," Handelsbanken's Von Bromsen said.

He said the focus will be on communication and guidance, ⁠as market watchers assess how policymakers are digesting not just higher energy prices but the second-round effects of potentially higher inflation.

The European Central Bank will hold its deposit rate on April 30 but hike it in June, according to just over half of economists polled by Reuters, in a bid to prevent a war-induced energy shock from knocking the euro zone economy off balance.

The Bank of England will meet on Thursday with money markets pricing in a hike by the end of the year, but no change at next week's meeting.

"It could be quite a messy, fractious kind of read from that one ... there could be a couple of hawks pushing for a hike straight away," Neil Wilson, UK investor strategist at Saxo, said.

"Largely they're going to stick to the wait-and-see approach ... but I think they'll be talking quite tough on inflation," Wilson added.

Meanwhile in Japan,core consumer inflation slowed below the central bank's 2% target for a second straight month in March. Analysts, though, expect inflation to accelerate back above ‌the Bank of Japan's target in coming months, as companies begin to pass on higher fuel costs from ⁠the Middle East conflict.

The BOJ is set to hold its two-day policy meeting ending on Tuesday. Reuters reported ​the bank is likely to hold off raising interest rates next week as fading prospects of a near-term end to the Middle East war keep the country's economic and price outlook highly uncertain.

The BOJ is still expected to signal its readiness to hike to counter mounting price pressures.

Japanese Finance Minister Satsuki Katayama reiterated her verbal warning on intervention on Friday that authorities can take "decisive" action ​against speculative moves in ‌the foreign exchange market, a day after saying Japan has a "free hand" to intervene and that past interventions had been effective.

The ⁠Australian dollar rose 0.2% versus the greenback to $0.7143. New Zealand's kiwi rose ​0.3% to $0.5871.

In cryptocurrencies, bitcoin was little changed at $78,260.44.

(Reporting by Satoshi Sugiyama; Editing by Lincoln Feast, Thomas Derpinghaus, Peter Graff and Andrew Heavens)