Brent crude oil rose above $50 a barrel for the first time in nearly seven months on Thursday but Asian shares struggled to gain traction, with worries about U.S. interest rates and China's slowing economy keeping many investors on the sidelines.

While energy stocks outperformed, a slump in mainland China stocks to 2 1/2-month lows dampened any broader interest in riskier assets in Asia, offsetting overnight gains on Wall Street.

"The market environment is not bad overall. Oil prices are rising, which would benefit oil-producing countries. But Asia may be hurt by concerns about the Chinese economy," said Shuji Shirota, associate director at HSBC in Tokyo.

"The market's focus is returning to the Fed, given rising expectations that they could hike rates much earlier than expected. That is weighing on many emerging markets as well," he said.

Japan's Nikkei rose 0.3 percent but MSCI's broadest index of Asia-Pacific shares outside Japan was almost flat, struggling to extend its rebound from Tuesday's 12-week low. It had gained 1.2 percent on Wednesday.

Shanghai shares fell more than 1 percent, with sentiment frail after a series of disappointing economic data earlier this month and fears that policymakers may be taking a more cautious stance on further stimulus as debt levels grow.

Share prices rallied globally overnight, led by European banks, which benefit from a decision by eurozone finance ministers to unlock new funds for Greece and to give it a firm offer of debt relief.

On Wall Street, U.S. S&P 500 Index rose around 0.7 percent to 2,091, its highest in almost a month and near its six-month intraday high of 2,111.

Energy stocks outperformed on the back of continued recovery in oil prices, which hit seven-month highs after the U.S. government reported a larger-than-expected drop in crude inventories.

Global benchmark Brent futures rose 34 cents or about 0.6 percent to as high as $50.08 per barrel, the highest level since early November. U.S. West Texas Intermediate hit $49.88, a seven-month high.

The rally in U.S. and European shares came even as investors readied themselves for monetary tightening by the U.S. Federal Reserve as early as next month.

The yield on two-year U.S. notes rose to a 10-week high of 0.938 percent on Wednesday as investors priced in the likelihood of the Fed raising its federal funds target rate to 0.50-0.75 percent from the current 0.25-0.50 percent in coming months.

It last stood at 0.903 percent, almost a quarter percentage point above this month's low of 0.686 percent.

Market players are awaiting comments by Fed Chair Janet Yellen at a Harvard University event on Friday, though many also say her speech scheduled for June 6 — after new U.S. payrolls data comes out — would be even more crucial.

Recent comments by Fed policymakers have put a possible rate hike this summer firmly on the table for discussion, but U.S. interest rate futures are still pricing in only about one-third chance of a rate hike in June and about a 60 percent likelihood by July.

The prospects of higher U.S. interest rates undermined the attraction of gold, which fell to a seven-week low of $1,217.90 per ounce though it came back up a tad in Asia to trade at $1,231.

In the currencies, sterling rose to $1.4700, near its four-month peak of $1.4770 hit earlier this month, as several bookmakers widened the odds on a British "Brexit" from the European Union after opinion polls showing the "in" camp leading.

The dollar was generally supported by U.S. rate hike expectations, while the euro stood at $.1151, having hit a 10-week low of $1.1129 overnight.

But it saw a 0.5 percent loss against the yen to 109.64 yen in early Asian trade in an erratic move.