Asian stocks rose on Thursday as oil producing nations unexpectedly agreed  to curb production at a meeting in Algiers.

OPEC agreed to reduce output to between 32.5 million and 33 million barrels a day from 33.4 million, news outlets reported, citing ministers.

Oil surged more than 5% in response but had largely given up gains towards the end of the Asian trading day. Brent crude was recently up 0.04% at $48.71 a barrel and West Texas intermediate was up 0.19% at $47.14.

Asian markets also got their first chance to react to a relatively uneventful testimony from Fed boss Janet Yellen before the House Financial Services Committee on Wednesday. She said the Fed has "no fixed timetable" for tightening its monetary policy.

U.S. stock futures rose, with the Dow Jones mini up 0.17% and the S&P 500 mini up 0.14%.

In Japan the Nikkei 225 closed up 1.39% at 16,693.71 and the Topix gained 0.94% to 1,343.25. Capital Economics said news of a worse-than-forecast 1.1% month-on-month decline in Japanese retail sales in August following growth of 1.4% in July left intact its assessment that consumer spending was rebounding in the third quarter. It noted that retail sales are well up from February lows.

Chemicals company Tokuyama rose about 16% after it agreed to sell a silicon unit to South Korean chemicals producer OCI.

Oil producer Inpex closed up 5.7%.

The Hang Seng was recently up 0.09% at 23,640.04.

Oil producers led the gainers, with Cnooc up 5.6% and China Petroleum & Chemical Corp up 4%.

On mainland China the CSI 300 was up 0.47% at 3,245.99.

In Sydney the S&P/ASX 200 was up 1.09% at 5,471.30.

Global mining leaders BHP Billiton (BHP) - Get Report and Rio Tinto (RIO) - Get Report  climbed 4.9% and 3.6%, respectively.