Former prime minister Kakuei Tanaka was being treated in a Tokyo hospital today after suffering a stroke, raising new questions about his continued role as a kingmaker.

If the illness decreases his influence in the ruling Liberal Democratic Party, some commentators here said, it could destabilize the government of Prime Minister Yasuhiro Nakasone, which has relied heavily on support from Tanaka.

"Mr. Nakasone rides on the shoulders of Mr. Tanaka," Hajime Tamura, a member of the Japanese Diet, or legislature, who is close to Tanaka told Japanese reporters today. Nakasone went to the hospital late this afternoon to visit Tanaka but reportedly was told that doctors were allowing only family members and his personal secretary to see him. About 100 Diet members also gathered at the hospital.

"As a friend, I pray for his quick recovery," Nakasone told reporters. Asked what impact the illness would have on politics, Nakasone replied, "none."

Doctors said that Tanaka, 66, who has held on to behind-the-scenes power despite a 1983 conviction for accepting $2 million in bribes from the Lockheed Corp., will remain hospitalized for three to four weeks. But they predicted that he would recover fully.

According to some news reports here, Tanaka had been drinking heavily in recent weeks. Late Wednesday afternoon, his family called doctors after he became too weak to get up. He was moved to the hospital several hours later.

The illness was the lead story in major Japanese newspapers and television news broadcasts today. Doctors gave up-to-the-minute briefings, and politicians from all sides rushed to make comments to the press on the implications of Tanaka's illness.

Tanaka commands the largest of five major factions in the Liberal Democratic Party. Although Nakasone has pledged publicly to "eliminate" Tanaka's influence in government, the prime minister's two-year endurance in office has depended on backing from Tanaka's faction.

However, many members of Tanaka's faction are known to be dissatisfied with their leader's choice for prime minister. If Tanaka loses control of his faction, Nakasone could have difficulty raising the votes needed to stay in office.

Tanaka is appealing his bribery conviction and has ignored demands from rivals in the ruling party to quit politics. In recent years, he has received a steady stream of politicians and supplicants at his Tokyo home, sometimes hundreds in a single day.

Commentators here long have predicted the end of his influence, only to see it endure. In Diet elections in 1983, he polled more votes than any other candidate in Japan.

His illness comes after attempts by two important faction subordinates to challenge his authority.

This fall, as Nakasone maneuvered for a new term as prime minister, the Tanaka faction's number two man, Susumu Nikaido, held secret discussions with leaders of other factions who wanted him to run for prime minister. He backed out at the last minute.

Earlier this month, Finance Minister Noboru Takeshita established his own "study group" within the faction, despite protests from Tanaka. The move was widely seen as an attempt to form the core of a new faction.