TOKYO - The euro hovered near a two-decade low against the dollar on Thursday as Europe's energy woes cast a long shadow over the economic outlook.

The euro was about flat at $1.01845 after sinking as low as $1.01615 on Wednesday, for the first time since late 2002.

The dollar index - which measures the currency against six peers including the euro, sterling and yen - held close to a 20-year peak at 107.27 reached overnight, last changing hands at 107.03.

German Chancellor Olaf Scholz said the country must move faster in its green energy transition with Russia using energy as a political weapon amid the war in Ukraine.

"U.S recession risk will periodically undercut the dollar, but Europe's energy cost squeeze is a greater threat to the Eurozone growth outlook," Westpac strategists wrote in a client note.

"The DXY's (dollar index's) broader medium-term uptrend likely persists a while yet, with scope for further unwinding of pricing for ECB policy tightening."

Thickening clouds over the European economy come just as the European Central Bank is preparing to raise borrowing costs for the first time since 2011.

Meanwhile, the U.S. Federal Reserve has been hiking rates aggressively, and minutes of June's meeting - when policy makers tightened by 75 basis points, the most since 1994 - revealed their concern that worsening inflation would erase faith in the Fed's ability to control it.

Investors had been paring bets for a prolonged aggressive tightening campaign since that meeting, as recession worries flared, but data overnight showed U.S. job openings fell less than expected in May, pointing to a still tight labor market that could keep the Fed on the offensive.

The next major U.S. economic release will be Friday's jobs report for June. Economists polled by Reuters expect employers to have added 268,000 non-farm payrolls during the month.

Benchmark 10-year Treasury yields slipped to 2.904% in Tokyo trading on Thursday from as high as 2.935% overnight, when the yield also tumbled to a more than one-month low of 2.746% due to conflicting signals over the policy outlook.

The dollar-yen rate, which is extremely sensitive to changes in long-term U.S. yields, eased 0.07% to 135.79 yen, consolidating around that level after pulling back from a 24-year high at 137.00 at the end of last month.

Analysts expect the pair to stay above 130 by year-end, although only seven of the 61 respondents expect it to be weaker than it is now, with four of those predicting a surge to 140, a Reuters poll showed.

Sterling languished near a two-year trough with British Prime Minister Boris Johnson fighting to keep his job amid a mounting rebellion within his party.

Investors also digested balanced comments from Bank of England chief economist Huw Pill, who said he was willing to step up the pace of rate hikes depending on the economic data, but preferred a "steady-handed" approach to "one-off bold moves," which can "be disturbing."

Sterling was little changed at $1.1924, after an overnight dip to the lowest since March 2020 at $1.1877.

(Reporting by Kevin Buckland; Editing by Sonali Desai)