Oil rose above $100 a barrel after US data showed a big drop in inventories of diesel fuel, heating oil and other distillates, igniting concerns about supply.

In Europe, banking shares led gains, but the problems in Greece and other debt-laden European countries cast a long shadow over markets.

“The focus right now is on whether Greece will follow through on agreed-upon austerity measures amidst widespread local dissent,” said Michael Woolfolk, senior currency strategist at BNY Mellon in New York.

“The growing consensus of an eventual technical default by Greece is contributing to uncertainty, which is increasingly undermining the euro,” he added.

Europe’s policy options to avert a Greek debt default appeared to be dwindling quickly, fueling fears of a chain

reaction affecting other heavily indebted countries in the 17-nation currency bloc.

In other developments, Finland approved a bailout for debt-laden Portugal. The Finnish parliament, unlike others in the region, has the right to vote on EU requests for bailout funds.

Analysts still expect the euro to fall below key support around $1.40 in the next few days, which would open the door to further selling toward $1.35.

Investors expect Athens, which is digging its way out of massive debts, to have difficulty implementing more austerity measures as the government’s main opposition party opposes such a move.

“We do not think Greece’s debt will be restructured any time soon,” said Barry Knapp, head of US portfolio strategy at Barclays Capital in New York.

The euro last traded at $1.4075, down from Tuesday’s close of $1.4100. The euro zone single currency briefly posted a 0.08 percent gain against the dollar.

Stocks on both sides of the Atlantic staged a comeback on the strength of US energy and material shares and bargain-hunting in European bank stocks.

The Dow Jones industrial average was up 35.46 points, or 0.29 percent, at 12,391.67. The Standard & Poor’s 500 Index was up 4.10 points, or 0.31 percent, at 1,320.38. The Nasdaq Composite Index was up 15.30 points, or 0.56 percent, at 2,761.46.

Caterpillar, a top supplier of mining equipment, was up 1.9 percent and gave the Dow its biggest boost.

“This is an oversold bounce, led by commodities and a retreat in the dollar index,” said Ryan Detrick, senior technical strategist at Schaeffer’s Investment Research in Cincinnati, Ohio.

World stocks as measured by MSCI were up 0.3 percent while the pan-European FTSEurofirst index of top shares rose 0.7 percent, with anxiety about the potential for further Greek contagion limiting gains.

Japan’s Nikkei closed 0.6 percent lower.

In the oil market, US data showing a drop in distillate inventories overshadowed worries over a pullback in gasoline demand. US crude was up $1.68 at $101.29 a barrel, while July Brent crude was up 2 percent at $114.78.

“The core fundamentals in crude are not deteriorating. They are still pretty good,” Barclays’ Knapp said.

Gold touched fresh three-week highs. Bullion priced in euros struck a record high on concerns about the impact of a possible debt default by Greece on other euro zone economies.

Spot gold was last bid at $1,526.89 an ounce, up from $1,525.75 in New York late on Tuesday. It had hit a three-week high of $1,532.10.

Appetite for stocks and commodities curbed safe-haven demand for US and German government bonds.

The 10-year Bund yield was just above the significant 3.0 percent level and could soon breach it given the unresolved debt crisis.

The 10-year US Treasury yield was edged up to 3.13 percent. It was still within striking distance of its 200-day

moving average of 3.09 percent, which if breached would signal a further rally for US bonds.