TOKYO, Feb 29 (Reuters) - Japan's Nikkei share average ended lower on Thursday, as investors sold stocks to lock in profits from the index's record high, but it erased most of its early losses on demand for buying on dips.

The Nikkei fell for a second day, edging down 0.11% to close at 39,166.19. The index fell as much as 0.8% earlier in the session to trade below the 39.000 level for the first time since Feb. 22.

"Investors bought back stocks after the Nikkei fell below 39,000," said Shuji Hosoi, senior strategist at Daiwa Securities.

"One outstanding stock was Toyota, which rose despite the yen's strength. It signalled that investors are still hunting for Japan's mega caps."

The yen strengthened against the dollar on Thursday after Bank of Japan board member Hajime Takata said the central bank must consider overhauling its ultra-loose monetary policy.

Toyota gave up its early losses to end 1.43% higher, becoming the biggest force to turn the broader Topix change course to end 0.03% higher at 2,675.73.

Chip-making equipment maker Tokyo Electron gave up early losses to end 1.04% higher.

However, sentiment was hurt by the latest data from the finance ministry, which showed foreign investors turned net sellers of Japanese stocks in the week when the index scaled an all-time high, Ryutaro Sawada, senior market analyst at Tokai Tokyo Research Institute, said.

Foreign investors sold 200 billion yen ($1.33 billion) of Japanese stocks in the week ended Feb. 24, pausing a seven-week buying streak.

Among other stocks, Aozora Bank surged 9.46% after public disclosure showed an activist fund City Index Eleventh owns 5.42% in the Tokyo-based bank.

Seven & i Holdings rose 6.19% after media reported that the convenience store chain operator was considering selling a supermarket unit to investment funds. A company spokesman said there was no truth to it.

($1 = 150.0000 yen) (Reporting by Junko Fujita; Editing by Mrigank Dhaniwala and Janane Venkatraman)