The dollar is up 2.5% from its recent low against a basket of currencies and stands near its highest level since March.

The nascent rally has defied expectations for the currency to resume a decline from last year's multi-decade highs: Net futures bets against the dollar stood at $12.34 billion in the week to May 30 after hitting a two-year low earlier in the month, according to data from the Commodity Futures Trading Commission. Fund managers in the latest BofA Global Research survey named shorting the dollar as the market's third "most crowded" trade.

The dollar is "in a very messy transition from bull market to a bear market," said Aaron Hurd, senior portfolio manager, currency, at State Street Global Advisors. "That transition period is going to be fairly frustrating."

Hurd expects the dollar to remain buoyant over the very short term, but decline steadily over the next few years.

Bears argue that the dollar has plenty of room to fall, as the currency remains some 15% above its post-pandemic low and the Federal Reserve is widely expected to soon end the interest rate increases that have helped support the greenback.

But the bears' view has been stymied by a run of strong U.S. data that suggests the economy remains resilient despite the barrage of Fed hikes aimed at slowing growth and containing inflation. Most investors believe the dollar will likely remain elevated until U.S. data turns decidedly weaker, allowing the Fed to cut rates.

The latest evidence of the economy's strength came Friday, when the U.S. reported greater-than-expected employment gains for May. Other recent data points, including consumer spending and new home sales, have also weighed against the view that the Fed will cut rates anytime soon.

Traders on Friday were betting that the fed funds rate - which currently stands between 5% and 5.25% - would finish 2023 at 4.988%, compared with expectations in early May to end the year at 4.188%. Higher rates tend to boost the dollar's appeal.

"The dollar strength is entirely related to the fact that U.S. data is actually pretty good," said Alvise Marino, a strategist at Credit Suisse.

Credit Suisse strategists recently bet on the dollar's gaining against the euro, according to a note. The greenback rose about 3% against the euro in May.

A stronger dollar can be a headwind for risk assets as it helps tighten credit conditions while weighing on the profits of U.S. exporters and multinationals.

Another potentially complicating factor for dollar bears is a flood of U.S. government bond issuance expected in the remainder of the year, with the U.S. Treasury expected to begin refilling its coffers now that the debt limit has been raised.

One view holds that such a large amount of Treasuries will drain liquidity from the market, potentially creating demand for dollars, said Bipan Rai, North America head of FX strategy at CIBC.

Still, many believe it's only a matter of time until the dollar resumes a downtrend that saw it lose as much as 11.5% from its September highs.

UBS Global Wealth Management ranks the dollar as its "least preferred" currency, saying the Fed is likely to cut rates late this year or early in 2024, reducing its yield advantage over the euro and other currencies.

Federal Reserve officials indicated last week that the central bank was likely to skip an interest rate hike at its upcoming meeting, on June 13-14, while leaving the door open to a future rise in borrowing costs. In Europe, European Central Bank (ECB) President Christine Lagarde said further policy tightening was necessary, a trend that would undermine the dollar's yield advantage.

"Once the Fed stops hiking, the market will focus more intently on the timing of the first rate cut and that is likely to undermine the dollar," said Brian Rose, senior economist at UBS Global Wealth Management.

Rai, of CIBC, believes the dollar's lingering strength will give way to weakness as it becomes clearer later this year that the Fed will hold off from further rate hikes while the ECB may have more work to do.

"From a macro sense, I still believe the dollar needs to decline," he said. "But that story might need to wait until the second half of this year."

(Reporting by Saqib Iqbal Ahmed; Editing by Ira Iosebashvili and Leslie Adler)

By Saqib Iqbal Ahmed