Japan's Nikkei stock average edged higher on Thursday, buoyed by gains in resource-linked shares such as Inpex <1605.T> after oil surged more than 4 percent and rekindled economic recovery hopes. Truckmaker shares climbed after a brokerage upgrade, with Isuzu Motors <7202.T> up more than 5 percent, and trading houses gained on strong metals prices.

But worry about Chinese shares was keeping gains capped after the Shanghai Composite Index <.SSEC> fell to its lowest close in two months on Wednesday, with trading volume in Tokyo lacklustre.

People are definitely still worried about China, and we're not seeing a lot of enthusiastic buying, with foreign investors not much of a presence right now either, said Koichi Ogawa, chief fund manager at Daiwa SB Investments.

Until Japan's election is over, stocks may find it hard to move.

The benchmark Nikkei rose 0.4 percent or 44.65 points to 10,248.65, up from the three-week closing low hit on Wednesday.

The broader Topix <.TOPX> rose 0.4 percent to 947.37.

Opinion polls have shown the opposition Democratic Party well ahead of the conservative ruling Liberal Democratic Party (LDP) in the August 30 race for the lower house of parliament, raising the prospect that the business-friendly LDP will lose power for only the second time in its 54-year history.

The Asahi newspaper said on Thursday that the Democrats could win about 300 of the 480 seats, though it added that results could shift in the final days of the race.

In the face of predictions of such a sweeping victory, some voters could shift to the LDP, meaning that uncertainty may actually have increased, Ogawa added.

But at this point the market still isn't paying that much attention, it's much more concerned about China.

China shares slid 4.3 percent on Wednesday, led by recently listed shares, as nervous investors pulled out on worries the 20 percent slide in just two weeks would deepen more. [ID:nHKG105116] I think there's no question that China was overbought, and for Japan to rise in tandem hasn't been all that good a thing either, said Nagayuki Yamagishi, a strategist at Mitsubishi UFJ Securities.

Energy shares dominated in the wake of oil's Wednesday surge after U.S. government data showed a steep drop in crude imports and inventories, though crude was drifting lower on Thursday.

The surprising drop in stockpiles sent Wall Street edging up on hopes that it could suggest an improving demand outlook. <.N>

Oil and gas field developer Inpex gained 1.9 percent to 714,000 yen, while distributor Nippon Oil <5001.T> rose 1.9 percent as well, to 531 yen.

Trading houses rose on both the oil gains and a recovery in metals prices, with Marubeni <8002.T> gaining 1.5 percent to 468 yen and Itochu Corp <8001.T> up 1.4 percent to 660 yen. Isuzu and Hino Motors <7205.T> climbed after Nikko Citigroup upgraded them to hold from sell, saying that truckmaker earnings could turn around in the second half of the current financial year on better overseas demand than the companies had originally planned. Isuzu climbed 5.4 percent to 197 yen and Hino Motors rose 2.4 percent to 381 yen.

(Reporting by Elaine Lies; Editing by Hugh Lawson)