Tokyo stocks rose 0.22 percent on Thursday as late buying offset early losses after US data showed the world's biggest economy unexpectedly shrank in the last quarter of 2012.
The benchmark Nikkei 225 index gained 24.71 points to 11,138.66 after it soared 2.28 percent Wednesday to its highest close in nearly three years thanks to a weaker yen.
The broader Topix index of all first-section shares was up 0.60 percent, or 5.58 points, at 940.25.
In early trading, dealers took a cue from Wall Street, where the three main indexes fell after the Commerce Department said the world's biggest economy contracted 0.1 percent in the October-December period.
The Dow, which closed near a record high on Tuesday, slipped 0.32 percent.
"Players cashed in on (the Nikkei's) recent gain in early trading," said Hirokazu Fujiki, strategist at Okasan Securities in Tokyo.
"But they started buying back shares in late trading on expected brisk earnings of Japanese companies, which underlined the current bullish sentiment," Fujiki added.
Just before the opening bell, official data showed Japan's industrial output for December rose 2.5 percent from the previous month thanks to brisk production of cars and semiconductors.
However, while the government said the figure indicated the sector had bottomed out, it missed market expectations of a 4.0 percent expansion, while over the full year, output slipped 0.3 percent.
Videogame giant Nintendo tumbled 4.59 percent to 8,920 yen after saying Wednesday it returned to profit in the nine months to December, but warned it was chopping its sales expectations for the new Wii U games console.
Firms linked to Boeing's troubled 787 Dreamliner were mixed.
All Nippon Airways lost 0.55 percent to 179 yen, while rival Japan Airlines rose 0.80 percent at 3,780 yen.
The 787 suffered a series of glitches earlier this month, prompting a global alert from the US Federal Aviation Administration that led to the worldwide grounding of all 50 of the planes in operation.
In afternoon forex trade, the dollar weakened to 90.91 yen from 91.05 yen in New York Wednesday, while the euro bought 123.24 yen from 123.54 yen.
The single currency $1.3555, from $1.3567.