* Nikkei loses 42 pct in 2008, worst year ever
* Average climbs in December, first month of gains since May
* Oil rise on Mideast tension boosts resource-linked firms
* Exporters rise as dollar holds steady, some window-dressing
* 2009 seen tough, but market may have bottomed out already (Adds stocks, details)
By Elaine Lies
TOKYO, Dec 30 (Reuters) - Japan's Nikkei stock average fell 42 percent in 2008, the worst loss in its 58-year history, though the benchmark gained 1.3 percent on its final half-day of trade. Canon Inc <7751.T> and other exporters gained as the dollar rose slightly against the yen before falling back, while oil and gas field developer Inpex <1605.T> climbed as oil extended gains on concern that Israeli attacks on Gaza could disrupt Middle East crude oil supplies. [
] [ ] Toyota Motor Co <7203.T> bucked the trend by slipping 1 percent, badly hit like the rest of the auto sector -- one of the Tokyo market's worst performing sectors this year -- by the worsening global economy. The Nikkei < > gained 112.39 points on Tuesday and rose 4 percent for December, its first positive month since May. But its annual losses were the worst ever, surpassing the 38.7 percent tumble marked in 1990.The broader Topix <
> gained 0.5 percent on Tuesday to 859.24 but was also down 42 percent for the year.Trade will resume on Jan 5.
Market players forecast a tough 2009 but said that hopes of further economic stimulus packages to stem the worsening of the global economy were providing some lift.
"Everyone's pinning their hopes on economic stimulus policies by the United States and possibly China, which is keeping the market supported for now," said Tomomi Yamashita, a fund manager at Shinkin Asset Management.
"But people aren't watching things like company results as closely as they should be. We can't say for sure that the market's bottomed out until we see these next spring."
In one possible sign of things to come, shares of Sharp Corp <6753.T> edged down 0.3 percent to 636 yen after the Nikkei business daily said the consumer electronics maker will book an extraordinary loss of more than 50 billion yen ($555 million) for the year to March 31, largely due to an impairment loss on its stake in Pioneer Corp <6773.T>. [
]But other market players said the worst was likely over.
"The main problems in the United States are being tackled one by one, meaning a lot of uncertainties are being removed," said Hideyuki Ishiguro, a supervisor in the investment strategy division at Okasan Securities.
"The market has also factored in the various company losses this quarter and the gloomy predictions for next quarter, so these alone are unlikely to send it to new lows."
The U.S. government said on Monday it was pumping $5 billion into auto and mortgage lender GMAC LLC and lending up to $1 billion to automaker General Motors <GM.N>, ensuring the solvency of a company considered crucial to GM's survival and providing some marginal support to Tokyo shares.
RESOURCE SHARES CLIMB, EXPORTERS UP
Oil prices rose <CLc1> after surging more than $2 on Monday amid concern that Israeli attacks on Gaza, which continued on Tuesday as Israeli aircraft fired missiles at government buildings in the Gaza Strip, could disrupt Middle East crude oil supplies. [
] [ ]Resource-linked shares such as Mitsubishi Corp and other trading houses climbed as a result.
Mitsubishi Corp, Japan's largest trading house, rose 2.8 percent to 1,238 yen and fellow trader Mitsui & Co <8031.T> gained 3 percent to 901 yen. Itochu Corp <8001.T> gained 1.8 percent to 443 yen.
Oil and gas field developer Inpex <1605.T> surged 5.1 percent to 698,000 yen.
Blue-chip exporters rose as well, with Sony gaining 1.2 percent to 1,922 yen and Canon Inc <7751.T> rising 2.8 percent to 2,770 yen.
But Toyota slipped 1 percent to 2,905 yen, though fellow automakers Honda Motor Co <7267.T> and Nissan Motor Co <7201.T> both rose.
Trade picked up on the Tokyo exchange's first section, with 854 million shares changing hands, compared with last week's morning average of 597 million.
Advancing stocks outpaced declining ones by nearly 3 to 1. (Reporting by Elaine Lies; Editing by Hugh Lawson)