KUWAIT, Nov. 7— A gunman was shot and killed today after he opened fire at American and Qatari troops guarding an air base in the Persian Gulf nation of Qatar that was being used by American military aircraft. The attack added to concerns in a region made uneasy by the war in Afghanistan.

The incident added to security worries surrounding a meeting of the 142-nation World Trade Organization set to begin on Friday in Doha, Qatar's capital. After the Sept. 11 terrorist attacks in the United States, organizers had considered moving the trade talks elsewhere, but decided in the end to keep them in Qatar.

In Washington, the White House said it had no indication of any connection between the attack and the American war on terrorism. In Qatar, a government spokesman told Al Jazeera television that the assault, by a Qatari citizen, had been ''an isolated event.''

But the assault, at a base about 20 miles southwest of Doha, was the first direct attack on a United States target in the region since the American attacks in Afghanistan began a month ago. It carried a reminder that the American military presence in the region, while generally low in profile, can stir considerable hostility.

Qatari authorities identified the gunman as Abdullah Mubarak al-Hajiri, and said he had attacked Al Adid air base at 10.35 a.m. Attorney General Abdullah al-Mal said the man climbed from a sports utility vehicle at an entrance to the base and opened fire with a Kalashnikov rifle before being killed by military guards.

The gunman fired at a position guarded by two Americans and one Qatari soldier, according to the United States Central Command. The official Qatar News Agency said that the gunman fired several times and that the guards shot back, killing him immediately. American officials said that no one apart from the attacker had been wounded in the incident.

For years, Osama bin Laden has pointed to the American presence in the Persian Gulf region as the primary justification for attacks against the West. He has said that ''infidel forces'' have no place on the Arabian peninsula and that the governments that harbor them should be toppled.

The Qatari air base is being used by American military aircraft under a military cooperation agreement signed last year. The agreement provides for use of the base by American warplanes in unspecified ''times of need,'' but American officials have declined to say whether the aircraft are being used in operations in Afghanistan.

The base in Qatar is also the site of the largest American stockpiles of weapons and other equipment positioned in the gulf for use in the event of military operations. But it is far from alone as a base for the American military: as part of a permanent American presence after the 1991 Persian Gulf war, Saudi Arabia, Kuwait, Bahrain, the United Arab Emirates and Oman all now house some combination of American soldiers, ships, aircraft or equipment.

Still, the American presence tends to be a sensitive subject for host governments, which generally prefer that it not be publicly discussed.

Since the Sept. 11 attacks, an American and another foreigner were killed in a bombing in the Saudi city of Khobar, and there have been small protests against the war in Afghanistan in Bahrain and Oman. In Kuwait, about half of the country's 50 elected members of Parliament have expressed opposition to the American attacks.

Qatar has remained relatively calm, officials there have said, and the tiny country of 650,000 was able to convince international trade officials that it could guarantee the security of the World Trade Organization conference. But as in most of the gulf, anti-American sentiment can easily be heard, particularly in mosques where clerics have deplored the deaths of Afghan civilians in the American attacks.

About 4,500 people are expected to attend the five-day conference, including 2,000 government delegates, 700 journalists and representatives of 600 nongovernmental organizations. The American delegation, headed by Robert B. Zoellick, arrived safely in Qatar several hours after the attack, the White House said.

Photo: A portrait of Abdullah Mubarak al-Hajri, killed in Qatar, was shown on television. (Al Jazeera via Agence France-Presse)