Stocks rose sharply Thursday as the yen weakened, propelling the Nikkei average toward the 18,000 line to mark its highest closing in about seven years and six months.

The Nikkei surged 327.04 points, or 1.85 percent, from Tuesday to finish at 17,979.72, its best finish since July 24, 2007, when it last closed above 18,000.

On Tuesday, the key market gauge shed 59.25 points. The Tokyo market was closed on Wednesday for a national holiday.

The Topix finished up 21.67 points, or 1.52 percent, at 1,449.39 on Thursday, extending its winning streak to a fourth day. It rose 2.80 points the previous trading day.

Tokyo stocks were sharply higher from the outset of Thursday’s trading, with investors encouraged by the yen’s weakening past 120 to the dollar, brokers said.

The market was also backed by Japan’s strong machinery order data, released just before the opening bell, they said, noting that investor optimism for a Japanese economic recovery grew.

According to data announced by the Cabinet Office, core private-sector machinery orders in December rose 8.3 percent from the previous month after seasonal adjustment, up for the second straight month.

Mainstay issues including automakers and precision equipment makers attracted hefty buying thanks to market expectations for their earnings growth.

In the afternoon, the Nikkei rose to as high as 18,005.45, topping the 18,000 threshold for the first time since Dec. 8 last year on an intraday basis.

“The market easily attracted index futures-led purchases thanks to the yen’s weakening,” said Hiroaki Hiwada, senior strategist at the Investment Research Division of Toyo Securities Co.

Although concerns over the Greek debt problem linger, market players are starting to think that the worst-case scenario can be avoided, Hiwada said.

At an extraordinary meeting in Brussels on Wednesday, eurozone finance ministers failed to reach an agreement on fresh financial aid to Greece. The ministers are slated to meet again on the matter on Monday.

Noting that export-oriented companies have reported brisk earnings, an official at an online securities firm said the Nikkei would continue rising if the yen weakens further against other major currencies.

Rising issues overwhelmed falling ones 1,258 to 497 on the TSE’s first section, while 107 issues were unchanged.

Volume grew to 2.773 billion shares from Tuesday’s 2.004 billion shares.

The weaker yen helped lift export-oriented names, including automakers Toyota, Fuji Heavy and Honda, and electronics makers like Sony and Panasonic.

Robot manufacturer Fanuc and electronic maker Kyocera were also on the plus side. Other major winners included realtor Mitsui Fudosan and clothing store chain operator Fast Retailing.

Yamazaki Baking surged after the bread producer said Tuesday that group operating profit in the business year to December is seen surging 24.5 percent from the previous year and its sales are expected to top ¥1 trillion for the first time.

By contrast, oil distributors Showa Shell Sekiyu, Inpex and Idemitsu Kosan came under selling after crude oil futures tumbled on the New York Mercantile Exchange on Wednesday.

JGC lost ground after the engineering firm announced Thursday morning a downward revision to its group operating profit estimate for the year ending in March.

Mobile phone carrier SoftBank and tire-maker Bridgestone were also downbeat.

In index futures trading on the Osaka Exchange, the key March contract on the Nikkei average was up 230 points at 17,870.