The Nikkei index gained 0.06pc on Friday to 20,418.81. The index fell 1.2pc in the previous session.
"The rise by equities in Hong Kong and Shanghai amid a suggestion by US President (Donald) Trump to China's president that they discuss issues, including the situation in Hong Kong, has supported the market," said Yutaka Miura, senior technical analyst at Mizuho Securities.
"But the market's gains are limited by global recession fears."
President Trump said on Thursday that he had a call scheduled soon with Chinese President Xi Jinping, but he did not say when.
The Nikkei has lost 1.3pc this week, during which an inversion of the US Treasury yield curve -widely regarded as a recession signal- triggered a global sell-off in riskier assets.
Some exporters fared a little better as the yen's advance against the dollar stalled. Nissan Motor Co was up 0.6pc, Panasonic added 0.5pc and Hitachi gained 0.6pc.
Semiconductor manufacturer Renesas climbed 3.3pc after its US peers such as Applied Materials Inc and Nvidia Corp posted upbeat results.
Other tech-related shares also gained, with Tokyo Electron rising 2pc and Toshiba Corp adding 1.3pc.
Unizo Holdings jumped 15.7pc after the Nikkei daily reported that US investment firm Fortress Investment Group will offer to buy the hotel operator, launching a counter bid against travel agency H.I.S. Co.
H.I.S. rose 5.8pc amid speculation that it could potentially pull back from a financially taxing takeover in the face of competition from Fortress.
Financial shares remained under pressure, with this week's sharp drop in bond yields seen hurting their profitability. Sumitomo Mitsui Financial Group was down 0.5pc and Shinsei Bank shed 2pc.
There were 131 advancers on the Nikkei index against 88 decliners.
The largest percentage gainer in the index was Daiwa House Industry Co, which rose 5.1pc. The largest percentage loser was Recruit Holdings Co, which suffered a loss of 3.1pc.
The volume of shares traded on the Tokyo Stock Exchange's main board was 0.86 billion, compared to the average of 1.13 billion yen in the past 30 days.
The broader Topix added 0.1pc to 1,485.29.