Tokyo stocks rallied Tuesday, with the benchmark Nikkei 225 average reaching its highest close since January 1992, bolstered by strong corporate earnings and the yen's weakness against the dollar.

The Topix, which covers all issues on the Tokyo Stock Exchange's first section, had its best finish since February 2007.

Electronics and machinery makers were among the biggest contributors to the Nikkei's advance after the yen weakened for the first time in four days against the dollar. Oil-related shares rose the most among sub-indexes after a crackdown on corruption in Saudi Arabia sent oil soaring to its highest price in more than two years.

The Nikkei ended the day 1.73 percent higher at 22,937.60, while the Topix gained 1.15 percent to finish at 1,813.29.

Of the more than 1,100 companies included in the Topix that have reported earnings for the current season, 63 percent posted year-on-year growth in earnings per share, at an average of 16 percent.

"The biggest reason behind Japanese stocks' rally has been strong earnings results," said Naoki Fujiwara, chief fund manager at Shinkin Asset Management Co. in Tokyo. "There's no cloud on the horizon of the global economy, and more investors are seeing that good earnings will continue through the coming quarters."

Both the Topix and Nikkei have gained about 20 percent this year, boosted by the prospects for higher corporate earnings and the continuity of Prime Minister Shinzo Abe's economic policies after his landslide election victory last month.

"The Nikkei 225 breaching the milestone is significant," said Hiroyuki Nakai, chief strategist at Tokai Tokyo Research Institute. "It could be a signal for an end of deflation in Japan."