Under the eyes of a contented Deng Xiaoping and with over 100 leading citizens of Hong Kong looking on, British Prime Minister Margaret Thatcher and Chinese Premier Zhao Ziyang signed the joint agreement on the transfer of Hong Kong in the Great Hall of the People yesterday.
The ceremony was one more step in what both China and Britain have promised will be a peaceful transition in 1997 from British colonialism to Chinese rule over the wildly successful enclave of capitalism on China's southern coast.
Both sides hailed the agreement as a breakthrough which, in the Chinese phraseology, is unique in its approach to solving a problem ''left over from history.''
During her hectic day in Peking, the British prime minister managed to meet with China's top four leaders, beginning with a three-hour session with Premier Zhao, a lunch with President Li Xiannian, and an afternoon meeting with Communist Party Secretary Hu Yaobang. Then, before the formalities of the signing ceremony, she met with the man who made the Hong Kong agreement possible , paramount leader Deng Xiaoping.
Mrs. Thatcher's discussion focused on the Hong Kong question, but also touched on bilateral relations and East-West issues.
Mr. Deng told Thatcher that without a settlement of the Hong Kong question, a shadow would hang over Sino-British relations. ''Now this shadow has been dispelled,'' he said.
Both sides said that the Hong Kong settlement would give a fresh impetus to broadening Sino-British trade and economic cooperation.
On East-West issues, Deng told the British leader, ''We hope progress will be made in the relaxation of relations between the United States and the Soviet Union.''
The deadlock on the arms talks must be broken, he added. ''Although the danger of war still exists, we feel the force for peace is growing stronger,'' he said, according to the Foreign Ministry spokesman, Ma Yuzhen.
Through all the talks and speeches, there was lavish mutual praise for the successful conclusion of the agreement, which many of the worst skeptics about Hong Kong's future under Peking's rule say is the best possible under the circumstances.
Thatcher was particularly effusive in praise of Mr. Deng's much-touted concept of ''one country, two systems'' - preserving two different political, social, and economic systems within China. This became the rationale for permitting Hong Kong to pass from British to Chinese hands without being tampered with by Peking's much-maligned Marxists.
The ''Sino-British joint declaration on the question of Hong Kong'' was the outcome of more than two years of tough negotiations. Most observers say that China had the upper hand in those working sessions because Deng set a deadline of September 1984 for their conclusion with the threat that China would regain control of the territory in 1997 whether or not there was a successful agreeement.
In the document, China has declared that Hong Kong's social and economic systems will remain unchanged for 50 years after China resumes control. It specifies that Hong Kong will become a Special Administrative Region under Article 31 of the Chinese Constitution, which would give it a high degree of autonomy. Hong Kong's independence in international economic relations is specifically protected under the agreement as well as the rights, freedoms, and life styles which its citizens now enjoy.
China and Britain negotiated and signed the agreement over the heads of Hong Kong's 5 million residents, most of whom are refugees who have settled there since the Communists achieved victory on the mainland in 1949. The status of Hong Kong citizens must still be hammered out between Britain and Hong Kong, with special British passports to be given to Hong Kong citizens.
Although Britain and China stress that the agreement serves Hong Kong citizens well, there was only a token ''assessment'' of Hong Kong public opinion by the British government before the pact was approved in Parliament earlier this month.
The anxieties of Hong Kong citizens about a future under Peking, and particularly the concerns of the territory's influential business community, have been heard nevertheless. In Thatcher's talks with Chinese leaders, the question of the credibility of the agreement constantly came up.
''What we say to the world counts, and we have always adhered to the agreements we have signed internationally,'' Premier Zhao told the British prime minister, according to the New China News Agency.
Hu said that China would implement the agreement in every respect because this concerns China's reputation in the world, Foreign Ministry spokesman Ma said.
Deng made the same case, saying that China will strictly abide by this agreement because the stability and prosperity of Hong Kong is in the interest of China's modernization program, according to Ma.
Thatcher told Deng, ''I have no doubt at all about China's sincerity in fully implementing this agreement.''
The next important step in the 13-year long transition is China's drafting of the Basic Law, which will govern Hong Kong as a Special Administrative Region. Zhao said the law would be completed by 1990. It must take into account the Sino-British agreement just signed and the existing legal and political arrangements in Hong Kong, presumably including the new structures for more democratic government being hammered out.
Zhao said Wednesday that the views of the Hong Kong people would be fully solicited as the Basic Law was being drafted, but gave no details as to how this would be done.