The Nikkei average inched down 0.31 percent on Thursday as investors grabbed profits in defensive stocks such as drug maker Daiichi Sankyo Co Ltd and utility shares. Trend Micro Inc, a maker of computer anti-virus software, led the Nikkei's fall with a loss of 4.9 percent to 3,480 yen after Microsoft Corp said on Tuesday it will start a free anti-virus service.
But Daiwa Securities Group and other brokerage firms advanced on recent rises in the market while steel stocks also drew buyers, helping the broader TOPIX index to add gains.
Investors have shifted their focus from defensive stocks to shares of blue chip companies, many of which posted strong quarterly earnings, said Masayoshi Okamoto, head of dealing at Jujiya Securities.
"Defensive stocks held firm last month, unfazed by growing uncertainty in global security risks," he said. In July, the drug sector added 3.4 percent while the TOPIX lost 0.9 percent.
The Nikkei turned negative in the last trading hour to end down 50.52 points at 16,020.84. The benchmark had closed at its highest level since May 19 on Wednesday.
The broader TOPIX index was up 0.11 percent at 1,631.46.
While some are cautious about further advances in the market, others like Fujio Ando, a market analyst at Chibagin Asset Management, remain keen on Japanese stocks.
Daiichi Sankyo, Japan's second-biggest drug maker, fell 2.5 percent to 3,160 yen, while No 1 Takeda Pharmaceutical Co Ltd lost 0.5 percent to 7,640 yen. Tokyo Electric Power Co Ltd also fell victim to profit-taking, slipping 1.6 percent to 3,150 yen.
Other losers included consumer loan firms such as Promise Co Ltd, which gave up recent gains after a media report that their earnings may be impacted by reimbursing clients who were found to have been charged excessive interest on loans. Promise shed 3.1 percent to 5,620 yen, losing part of its 17.4 percent gain of the last three sessions.
In the steel sector, Kobe Steel Ltd surged 5.1 percent to 374 yen and JFE Holdings Inc jumped 4.4 percent to 4,770 yen. Daiwa Securities rose 4.5 percent to 1,469 yen and Nomura Holdings Inc added 2 percent to 2,250 yen. A notable gainer was Nissan Chemical Industries Ltd which jumped 4.8 percent to 1,519 yen after UBS analyst Takaaki Muramatsu said in a note to clients on Wednesday that the company was set to have a much better first half than expected.
Before the start of trading, foreign brokerages posted orders to buy a net total of 31.7 million shares, market participants said. It was the largest net buying since last November, according to research firm Traders & Company Inc. The Tokyo Stock Exchange (TSE) data also showed on Thursday that foreign investors bought a net 67.8 billion yen ($586.1 million) of Japanese stock last week, their third straight week of net buying.
Foreign investors have a significant presence in the Japanese market and their trade represents nearly 60 percent of all TSE trade. Trade activity rose to its highest level since June 9, with 2.29 billion shares changing hands on the Tokyo exchange's first section. Declining shares beat advancers 799 to 767.