A hijacked Japanese airliner carrying 11 terrorists and about 30 hostages landed at Kuwait early Monday after a two-hour, air-to-ground war of nerves between the hijackers and Kuwaiti officials.

The plane apparently was almost out of fuel when it was permitted to land.

The Japan Air Lines DC-8 flew 3,000 miles from Dacca, Bangladesh, then circled the Kuwait airport for two hours after being refused permission to land.

Kuwait officials turned off the runway lights and moved armored cars onto the runway. The lights were turned back on and the vehicles were moved off the runway shortly before the plane landed.

The plane took off Sunday night from Dacca, Bangladesh, after an eventful, 5 1/2-day siege.

Hajime Ishii, leader of the Japanese government delegation sent to Bangladesh to negotiate with the terrorists, said the Japanese had "reached understanding with a certain country in the Middle East for a landing by the hijacked plane," the Japanese news agency Kyodo reported.

On Saturday, $6 million in ransom and six Japanese prisoners were loaded on the plane in exchange for 60 hostages. The ransom was thought to be the largest ever obtained in an air hijacking.

Shortly afterward a revolt broke out in a nearby Bangladesh army camp and spread to the airport. Scores of persons were killed in the fighting, which delayed negotiations with five hijackers, members of Japan's radical Red Army.

After the rebellion was quelled, the heavily armed hijackers agreed to release another group of about 40 hostages in exchange for permission to take off.

They refused Japanese requests that they allow all of the passengers to go.

One terrorist reportedly said: "We must get where we are going. It is very dangerous. We have imperialist and Zionist enemies. They could shoot down our plane and crew. They can't shoot us down if our passengers are on board."

Bangladesh officials cleared the plane for take off despite a last-minute telephone appeal from Japanese Prime Minister Takeo Fukuda, who asked that it be kept on the ground until all the passengers were freed.

Most of the 140 passengers aboard the plane when it was hijacked Wednesday have been freed in stages, and there were conflicting reports of how many remained aboard.

Officials in the Dacca control tower said there were 30 hostages - 24 passengers and six crew members - aboard when the plane took off. Airline officials in Tokyo said there were at least 29 passengers and between seven and nine crew members aboard.

Bangladesh officials said there were three Americans still aboard. One was identified as Eric Weiss of the San Francisco area, and the other of two were identified only by their last names, Phalen and McLean.

Most of the remaining hostages were thought to be men.

Among the Americans released in Dacca were former California Assemblyman Walter Karabian; his wife, former actress Carole Wells Karabian, and California banker John Gabriel.

The hijackers had threatened to execute Gabriel after learning that he was acquainted with President Carter. They released him after he became ill, and he was hospitalized in serious condition.

The plane was commandered Wednesday after taking off from Bombay en route to Bangkok on one stage of a Paris-to-Tokyo flight.

The terrorists said they were members of the Red Army, which has staged a number of violent terrorist actions in Asia and the Middle East. Some members of the group have collaborated with Palestinian terrorists in attacks on Israelis.

In the past, members of the Red Army have found refuge in Libya and Yemen.