TOKYO, Jan. 13— Three days before Prime Minister Kiichi Miyazawa takes his first official trip to South Korea, the Government admitted today that the Japanese Army forced tens of thousands of Korean women to have sex with Japanese soldiers during World War II, and hinted that women who are still alive might receive some kind of compensation.

Until today, Japan's official position has long been that the "comfort girls" were recruited by private entrepreneurs, not the military.

But many historians have attacked that position as a convenient rewriting of history, and over the weekend Asahi Shimbun, one of Japan's largest newspapers, reported that army documents found in the library of Japan's Self-Defense Agency indicated that the military had played a large role in operating what were euphemistically called "comfort stations."

Mr. Miyazawa is widely expected to address the issue on his visit to Seoul and to offer a fairly specific apology. The vast majority of the women were forcibly taken to Japanese-occupied China and Southeast Asia from Korea, which was a Japanese colony from 1910 until Japan's defeat in 1945.. 'Abominable Episodes'

Over the weekend Japan's Foreign Minister, Michio Watanabe, said "I cannot help acknowledging" that the Japanese military was involved in forcing the women to have sex with the troops. "I am troubled that the abominable episodes have been unraveled, and they give me heartache," he said.

Today Japan's chief Government spokesman, Koichi Kato, offered a more specific apology, saying, "We would like to express our heartfelt apology and soul-searching to those women who had a bitter hardship beyond description."

But he said that because Japan settled issues of wartime compensation for Korea in 1965, when the countries resumed full diplomatic ties, there would be no official compensation for the victims. For weeks the Government has been talking about finding private sources of money that would settle claims by surviving "comfort women," without setting the precedent of reopening reparations claims.

In December, around the time of the 50th anniversary of the Pearl Harbor attack, three Korean women filed suit in Tokyo, demanding compensation for forced prostitution in China. Occasional Protests in Seoul

Though the Government said that officially all compensation issues have been settled, officials acknowledged that they could not openly contest the suit without roiling relations with South Korea. Periodically there have been small demonstrations in Seoul denouncing the Japanese for their failure to face the issue.

The question of Japan's refusal to acknowledge official involvement in the forced prostitution has been a continual irritant in Japanese relations with South Korea and, to a lesser degree, with China. Many of the women were killed or brutally beaten. While historians disagree about how many women were forced to have sex with the troops, estimates run from 60,000 to more than 200,000.

The documents reported in Asahi Shimbun were found by Yoshiaki Yoshida, a history professor, who reviewed them at the Defense Agency. They have been in Japan since 1958, when they were returned by United States troops, and it is not clear why they have stayed out of view for so long.

The "comfort women" debate has been but one of the continuing tensions between Tokyo and Seoul in recent years. South Korean leaders have long complained that they have yet to receive an adequate apology from Japan for wartime atrocities. Last week, at a dinner for President Bush, President Roh Tae Woo of South Korea reportedly expressed concern that Japan has yet to apologize fully for the war.