BEIJING, SEPT. 24 -- U.S. Air Force fighter pilots gunned their F16 jets into near vertical takeoffs, then flew loops and rolls over the southern outskirts of Beijing today in a dazzling display of American air power and finesse.

To the sound of theme music from "Superman" and "Chariots of Fire" blaring from loudspeakers on the ground, the first U.S. fighter pilots to fly over Chinese territory since World War II demonstrated the latest aerial techniques to more than 5,000 Chinese, most of them military men. The visit by the Air Force Thunderbird demonstration team marked another step in a growing military relationship between the United States and China.

The visit by the fighter planes, which are on an Asian tour, took place less than one year after American warships paid a port call at Qingdao in eastern China.

Among those watching the demonstration at the Nanyuan Air Base was U.S. Air Force Secretary Edward Aldridge Jr. and China's Air Force commander, Wang Hai. During the Korean War, Wang led a group of Chinese fighter planes in combat against American jets. According to a China News Agency profile of Wang, he shot down five American planes.

But today, Wang beamed as he pasted a decal displaying the Chinese flag to the side of one of the jets. At the end of the 40-minute show, he climbed into a cockpit for a closer look. The F16 is one of the most advanced U.S. fighters.

The United States and China agreed last year on a $550 million program to reequip 50 of China's F8-2 fighter planes with new electronics, including radar and flight control systems. The United States is also selling large-caliber artillery shell fuses and a limited number of torpedoes to the Chinese.

Aldridge told reporters that the U.S. Air Force will be sending teams to China to work with the Chinese Air Force to establish a training and maintenance program to go along with new technology.

"We have lots of common interests," said Aldridge, adding that China is an important, strategically located country.

Today's show featured straight-up movements, slow rolls, bursts, loops and duck-walks, all in tight formation. Chinese Air Force officers applauded as four planes criss-crossed at close quarters and later formed a "bomb burst" pattern high in the clear blue sky. Two planes flew head-on at each other at a high speed, avoiding a collision by only 75 feet.

Yesterday, the F16s roared over the Great Wall, making two passes in a hazy sky, flying in formation several hundred feet above the wall.

After today's demonstration, top Chinese military officers chatted briefly with the American pilots, praising them for their precision flying.

Li Desheng, a former regional Army commander and now political commissar of China's National Defense University, asked Lt. Col. Roger Riggs, of Louisville, Ky., the Thunderbirds commander, how many hours he had flown. Riggs, who flew combat missions over Vietnam and Laos during the Vietnam war, replied that he had flown 3,900 hours.

"That's quite a lot," said Li.

The Chinese military tightly controlled access to the Nanyuan Air Base today. China has given little publicity to its military links with the United States, apparently to maintain an image of independence and avoid antagonizing the Soviet Union. In the view of Chinese military men, the Soviet Union remains the biggest potential threat to this country.

China's military technology remains more than 20 years behind that of the Soviets. Given their desire to remain independent and their shortage of funds, the Chinese have been cautious in their approach to U.S.-China military relations.

There is no talk of granting the U.S. Air Force basing rights or even refueling rights in China. It is considered highly unlikely that the relationship will develop into anything close to a military alliance. The Chinese agreed to invite the Thunderbirds demonstration team here only after protracted consideration, according to one source.