The American flag hoisted today over a U.S. Embassy in mainland China for the first time since 1949, formally completing the process of normalizing of diplomatic relations between the United States and the People's Republic of Chima.

To the cheers of about 300 American and Chinese employes, the old flag of the liaison office was hauled down and a new one briskly raised -- except for one minor snag on the way to the top.

Several hundred curious Chinese residents -- some of whom were reported to have whited four hours under sunny skies for the noontime event -- were lined up across the street.

Ambassador Leonard Woodcock, who was confirmed in the post Monday, did not make it to Peking in time for the ceremony.

But Treasury Secretary W. Michael Blumenthal, as a special emmissary of President Carter, and Stapleton Roy, Woodcock's deputy, spoke briefly. The ceremony was enlivened by fireworks. And a taped rendition of the Star Spangled Banner as the new foag moved to the top of the coutyard flagpole.

Fifteen youngsters of the American Embassy School, led by their teacher, Mollie Tkacik of Alexandria, Va., sang "America the Beautiful."

Blumenthal, who lived in Shanghai from 1939 to 1947, used the occasion to stress that the opening of the embassy had more than symbolic importance. Speaking with some personal emotion, he recalled his long association with China "as a child and a young man."

Chinese officials did not attend the embassy cermony, but they and American businessmen were invited to a reception afterward.

Blumenthal, who has been meeting with Chinese officials for four days to put accelerated commercial relations on track, said it is in the interest of the United States and the world that "the Chinese people succeed in their four modernizations." Even though the histories and political systems of the two countries differ, he said, they can trade and work together.

The transformation of the liaison office, set up in 1973, into an embassy, was simple. Blumenthal and Roy unscrewed a plaque on the garden wall that said "liaison office," and screwed in a new one that said "Embassy of the United States of America."

Blumenthal also presented the embassy's new consular flag to Consul John Tkacik, Mollie Tkacik's husband.

Roy noted that woodcock would be the first U.S. Embassy in mainland China was located in Chungking, and it was relocated in Taipei on Dec. 24, 1949.

There had been a consulate general in Peking (called Peiping by the Nationalist govenment). When the Nationalists moved the copital to Nanking, the United States opened an embassy there. Successively, it was moved to Canton, then Chungking, and eventually to Taipei.

Historians at the embassy here say that before the opening of the liaison office in June 26, 1973, the last American flag that flew here came down in 1950 when the consulate was closed.

The americans at the ceremonies -- primarily employes of the embassy and their families -- were the most emotionally involved and clearly enjoyed the festivities.

Another embassy schoolteacher, Evy Sylvester of Washington, D.C., said to the children, "Okay boys and girls, let's sing it for America." Most of the Americans in the crowd joined in their rendition of "America the Beautiful."

The embassy building is a two-story modern looking, graystone affair, built around an ample courtyard. It was designed by a Chinese architect and built in 1973 for the liaison office. It is locted in the embassy section of Peking. The stoff of about 30 is to be doubled soon.

"We have about one staff man for every 25 million Chinese," Roy said with a smile. "We have the heaviest per capita work load in the diplomatic corps."