Soviet President Mikhail S. Gorbachev, in an apparent reference to China, said Friday that "the development of relations with third countries" will not affect the Kremlin's friendly ties with India.

Gorbachev's three-day state visit began with a brisk motorcade under arches covered with roses, marigolds and chrysanthe-mums. Thousands of spectators waved Soviet and Indian flags.A more somber note was sounded by a police warning to all Afghan refugees to stay off the streets until Gorbachev leaves town Sunday.

An estimated 7,000 Afghan refugees, many of them opposed to the Soviet military involvement in their homeland, live in New Delhi.

Gorbachev conferred with Prime Minister Rajiv Gandhi for more than two hours before attending a private banquet with Gandhi and President Ramaswamy Ven-kataraman.

In a dinner speech, Gorbachev sought to dispel any doubts about the future of Soviet-Indian relations.

Gorbachev did not mention China in his speech, but he referred to "comments and rumors that are not exactly friendly."

"Some go as far as saying that the Soviet Union is changing its priorities, even becoming cool toward India," he said. "Comparisons are being drawn between our first visit (in 1986) and the current one, between Soviet-Indian relations and other foreign policy contacts of the Soviet leadership.

"I shall not dignify with an answer such totally groundless and obviously speculative assertions."

Chinese leader Deng Xiaoping is scheduled to be Gorbachev's guest in Moscow early next year, a significant warming of ties between the world's two largest communist nations.

Gandhi is to visit Beijing next month. It will be the first time an Indian prime minister has visited China since Jawaharlal Nehru went there in 1954.