China accepted a Vietnamese proposal for peace talks yesterday, saying it was prepared to settle the border conflict that led to China's invasion of Vietnam on Feb. 17 as well as the other disputes that have sharply divided the once-close allies.

While Peking's more appears to signal an end to the simmering border war between the two countries, observers here and and in Peking predict that their negotiations will be long and bitter.

China's agreement to meet follows by two days Hanoi's announcement that it no longer would insist that all Chinese troops leave its territory before any talks could be held.

China has maintained for more than two weeks that it had withdrawn all its invading forces. Nevertheless, many Western analysts believe that the Chinese have held at least some small portions of Vietnam for tactical military reasons and for leverage in negotiations.

While the Chinese assault across the border followed several months of sporadic skirmishing along the ill-defined mountainous border, any dispute about territory probably is the least significant of the many conflicts between the two Communist states.

Peking officials made it clear that they had ordered the invasion to teach Hanoi "a lesson." The Chinese had been outraged by Vietnam's military conquest of the Khmer Rouge government in Cambodia, a close ally of China.

China denounced Vietnam's action as part of a plan to dominate all of Indochina.

Even more troubling tot he Chinese has been the incresingly close ties between Vietnam and the Soviet Union, which Peking regards as its main enemy. The Chinese describe Vietnam as the leading edge of the Soviet strategy to encircle and isolate them in Asia.

Hanoi's relations with Moscow are expected to be the major stumbling block to any settlement between Vietnam and China. The Vietnamese, who define their country's history largely in terms of a centuries-long struggle to free themselves from Chinese domination, and unlikely to bow to Peking's demands that it weaken its ties to Moscow.The Vietnamese are heavily dependent on the Soviet Union for military supplies and for financial support for their troubled economy.

In a lengthly note accepting the Vietnamese invitation to talks, the Chinese Foregin Ministry said that the negotiations in Hanoi should "search for practicals measures to ensure peace and tranquility along [the] border, restore normal relations and then proceed to settle their boundary, territorial and other disputes so as to contribute to peace, tranquility and stability in Southeast Asia and in Asia as a whole.

"If the Vietnamese side creates no further complications," the note said, "the Chinees government delegation headed by Vice Foreign Minister Han Nianling will arrive in Hanoi on April 14, 1979."

In a related development - and one indicating the Chinese attitude as they prepare for the talks - the official newspaper, Peoples Daily claimed that Soviet warships were at Cam Ranh Bay and said it was the ominous beginning of Moscow's "southward strategy."

"Reports about the entry of Soviet warships into Cam Ranh Bay have been known for weeks, and yet the Vietnamese authorities make no denial," the newspaper's commentary said. "Such an abnormal atitude on the part of Hanoi is as striking as the reports themselves."