Indian Prime Minister Rajiv Gandhi was formally welcomed Monday by his Chinese counterpart, Li Peng, and called for a "new beginning" in relations that have been strained by border disputes for three decades.

The leaders of the world's two most populous nations stood together on a red-carpeted podium inside the cavernous Great Hall of the People as a 19-gun salute boomed across adjacent Tianan-men Square and a military band played the national anthems of both countries.After inspecting an honor guard, Gandhi and Li sat down in the Eastern Hall for formal talks that come amid subtle shifts in the power triangle between China, India and the Soviet Union.

"Together our nations constitute more than one-third of humanity," Gandhi said. "We should be looking more toward each other. The time has come."

In his welcoming statement to Gandhi, Li stressed the similarities in population, size and economic development between the two countries and expressed his hope for better relations.

"China and India are two countries in Asia with the most ancient civilizations and have the largest populations of developing countries," Li said. "There is no reason for our countries not to get along."

The first Indian prime minister on Chinese soil in 34 years spent much of his first day in China in private talks with Li.

Gandhi was to meet Deng Xiaoping and Communist Party General Secretary Zhao Ziyang during his five-day visit, which also will include trips to Xian and Shanghai.

India and China are not expected to settle intractable border disputes that have bedeviled their relations since they fought a monthlong war in 1962, but the visit still has considerable importance.

The positions of the Asian giants are no longer static, partly due to the trail-blazing diplomacy of Soviet leader Mikhail Gorbachev, who called for a Sino-Indian rapprochement during a visit to New Delhi three weeks ago.

Gorbachev is concerned that the Soviet Union's strong ties to India, which faithfully sides with the Kremlin on most foreign policy positions, could be weakened as he moves to end more than a quarter of a century of hostile relations with China. The two communist giants are expected to hold a summit in early 1989.

But China, which has long used its ally Pakistan as a counterbalance to India, could feel less compelled to provide military and economic aid to New Delhi's arch-foe once the Kremlin's troops have left neighboring Afghanistan.

Moreover, India and China have plenty to gain from the building of links in areas such as trade - currently less than $100 million annually - and exchanges in culture, science and technology.

Officials said Gandhi is scheduled to sign cooperative agreements in these fields Wednesday and authorize the opening of direct air links between Beijing and New Delhi.

Sino-Indian relations thawed in 1954 during the Beijing visit of Gandhi's grandfather, Jawaharlal Nehru, the first prime minister of the newly independent India.

But the relationship deteriorated and was severed in 1962 when China, largely to try the limits of Indo-Soviet friendship, poured thousands of troops over India's borders in the western and eastern Himalayas.

Beijing forces withdrew from the east, but held on to the 14,000-square-mile western area of Aksai Chin, still claimed by New Delhi.

Eight rounds of border talks since 1981 have yielded no breakthroughs, and Gandhi is unlikely to concede on this nationalist issue as he is up for re-election next year.