The benchmark 225-issue Nikkei average ended higher on Friday and posted its biggest weekly gain in nearly two years, tracking overnight Wall Street gains, amid caution over a five-day rally in local markets.

The Nikkei share average advanced 0.65% to end at 26,827.43 and rose 6.62% for the week, the biggest weekly gain since May 2020.

The broader Topix rose 0.54% to 1,909.27 and rose 6.1% for the week, the biggest rise since early April 2020.

"The market rose sharply yesterday because investors who had shorted stocks bought them back. But with the long weekend ahead, they refrained from active bets," said Shigetoshi Kamada, general manager at the research department at Tachibana Securities.

The Nikkei had jumped more than 3% on Thursday to post its highest close in more than two weeks.

"Today, both buyers and sellers were cautious," Kamada said.

Technology investor SoftBank Group led the Nikkei's gains, rising 3.68%, followed by chipmaking equipment firm Tokyo Electron, rising 0.85%, and Uniqlo clothing shop owner Fast Retailing, which edged up 0.5%.

Toshiba Corp. rose 1.15% after an independent director said he would back a shareholder proposal at next week's extraordinary meeting that could pave the way for a potential buyout of the conglomerate.

Toyota fell 0.79% as the automaker said it would cut its global production target in April to 750,000 vehicles, down 150,000 from an earlier plan as a semiconductor shortage and the COVID-19 pandemic bite into its plans.

Toyota's declines dragged the index of auto and parts makers 0.88% lower, making the sector the worst performer among the Tokyo Stock Exchange's 33 industry sub-indexes.

Airlines followed with a loss of 0.58%.