The benchmark Nikkei average briefly retook 20,000 for the first time in about 15 years on the Tokyo Stock Exchange on Friday, but failed to close above the important threshold due to profit-taking.

At the close, Nikkei 225 stood at 19,907.63, down 30.09 points, or 0.15 percent, from Thursday. In early trading, the Nikkei climbed to as high as 20,006.00, topping the 20,000 mark for the first time since April 17, 2000, on an intraday basis. The Topix index of all first-section issues closed down 4.65 points, or 0.29 percent, at 1,589.54.

Both indexes dropped for the first time in four days.

The Nikkei opened higher and soon topped 20,000 after European and U.S. shares advanced on Thursday and on the back of the yen’s weakening against the dollar. After the initial buying ran its course, however, the market lost steam as selling to lock in profits increased, with the Nikkei ending the morning session lower.

It snapped back onto the plus side in the afternoon, but fell prey to renewed selling in late trading.

An official at a bank-affiliated securities firm said that a sense of overheating grew in the market following the Nikkei’s recent surge. Still, the market’s downside remained solid thanks to investor hopes for improvements in corporate earnings and the economic recovery, while domestic demand-oriented names attracted hefty buying. In addition, stock purchases by pension funds and purchases of exchange-traded funds by the Bank of Japan underpinned the market.

On the other hand, some analysts warned that the Tokyo market may enter a correction phase.

“While there is nothing to worry in Japan, developments in overseas markets will be the key for the course of Tokyo stocks,” said Masayuki Otani, chief market analyst at Securities Japan Inc.

Next week, many U.S. companies are set to announce their earnings reports and key economic indicators will be released in China. The Tokyo market could go either way depending on the results, Otani said.

Falling issues outnumbered rising ones 969 to 751 on the first section, while volume grew to 2.045 billion shares.

Drug makers Eisai and Astellas Pharma, and shipping firms Nippon Yusen, Mitsui O.S.K. Lines and Kawasaki Kisen suffered sharp drops. Japan Tobacco, automakers Toyota and Fuji Heavy, and industrial robot maker Fanuc were downbeat. Also on the minus side were electronic devices maker TDK, air conditioner manufacturer Daikin and convenience store operator Lawson.

By contrast Ryohin Keikaku shot up 11.71 percent after the operator of Muji brand household goods stores announced Thursday that its group sales and profits are seen rising sharply year on year in the current business year through February 2016. Fast Retailing, the operator of Uniqlo and other clothing stores, gained 2.47 percent, with investors heartened by the company’s announcement on Thursday of an upward revision to its consolidated earnings estimates for the business year to August.