TOKYO, Oct 2 (Reuters) - Japan's Nikkei average tumbled to a five-week low on Friday, after U.S. President Donald Trump said he tested positive for coronavirus, further complicating an already tangled U.S. election outlook.

A day after all share trading was suspended due to a system glitch, Nikkei lost 0.67% to 23,029.90, its lowest close in five weeks, though it has managed to end above its 25-day moving average. The broader Topix dropped 1% to 1,609.22.

Both indexes fell sharply after Trump said he and first lady Melania Trump had tested positive for COVID-19 and would immediately quarantine, erasing earlier gains.

"I suspect markets will lean towards the view that Biden will likely win the election... What I am worried is that he will become even more aggressive against China after he caught the virus himself," said Naoya Oshikubo, senior economist at Sumitomo Mitsui Trust Asset Management. "For the time being it will be difficult for financial markets to be on risk-on mood."

Investors rotated out of this year's winners such as drugmakers as well as recent gainers such as railway operators.

Drugmaker Daiichi Sankyo, Ono Pharmaceutical and Shionogi fell 5.1%, 4.1% and 3.8% respectively.

Railway firms were also under pressure with the country's three major network operators, East Japan Railway, Central Japan Railway and West Japan Railway dropping 2.5%, 2.6% and 2.3%.

Shares of Japan Exchange Group, the parent company of Tokyo Stock Exchange, fell 1.9% while Fujitsu, developer of the exchange's system, lost 2.8%.

On the other hand, department store operators, one of the worst-hit segments this year, extended their strong recovery after a leading firm, J.Front Retailing, upgraded its earnings forecast earlier this week.

Isetan Mitsukoshi gained 4.1% while Takashimaya rose 3.5% and J.Front Retailing added 2.5% to log a weekly gain of almost 17%.

Nishimatsuya, operator of infant goods stores, rose 6.1% to a 4-year high, after it too raised its earnings forecast.

($1 = 105.58 yen) (Reporting by Hideyuki Sano; Editing by Vinay Dwivedi and Carmel Crimmins)