TOKYO, May 27 (Reuters) - Japan's Nikkei snapped three straight sessions of losses on Friday, tracking an overnight Wall Street rally, although gains were limited as investors started selling stocks when the benchmark index approached the 27,000 psychological level. The Nikkei share average rose 0.66% to close at 26,781.68 and ended 0.16% higher for the week. The broader Topix climbed 0.52% to 1,887.30 and posted a weekly gain of 0.53%.

Wall Street closed sharply higher overnight after optimistic retail earnings outlooks and waning concerns about overly aggressive interest rate hikes by the U.S. Federal Reserve put investors in a buying mood.

"Wall Street's strong finish lifted Japanese markets, but investors sold shares as soon as the Nikkei got close to the 27,000 level to book profits," said Ikuo Mitsui, a fund manager at Aizawa Securities.

"They were concerns about risks stemming from high U.S. inflation and its effect on interest rates."

Nippon Yusen jumped 6.4% after the shipping firm announced a stock split.

The shipping sector added 4.88% and was the top gainer among the Tokyo Stock Exchange's 33 industry sub-indexes.

Shares of companies related to inbound tourism rose as Japan eases its border control to allow more tourists. Department store chains J.Front Retailing and Takashimaya rose 4.7%% and 4.11%, respectively.

Discount store Don Quijote operator Pan Pacific International Holdings surged 9.34%.

Gas provider Osaka Gas fell 3.02% and was the worst performer in the Nikkei, followed by medical services platform M3 Inc, which fell 2.81% and trading firm Marubeni , losing 2.56%.

There were 143 advancers ion the Nikkei index against 80 decliners. (Reporting by Junko Fujita; Editing by Subhranshu Sahu and Sherry Jacob-Phillips)