A front-runner in Iran's presidential election campaign has accused the Soviet Union of seeking to seize parts of Iranian territory in an effort to reach the Indian Ocean and said that the recent Afghan invasion was part of a Kremlin design to reach warmwater ports.

The remarks by Finance Minister Abol Hassan Bani-Sadr represent a first major public attack on Moscow, suggesting a shift in attitude toward the Soviets following their invasion of Afghanistan three weeks ago.

In another development showing growing regional unease about the Afghan events, India's Prime Minister Indira Gandhi yesterday said that she would like to see a withdrawal of Soviet troops from Afghanistan because they pose a danger to the stability of South Asia.

Speaking after a meeting with British Foreign Secreatary Lord Carrington, who is visiting New Delhi as part of a NATO mission to the troubled region, Gandhi said, "I don't think we supported the [soviet] action. We are trying to find a way so that the situation does not escalate further."

Later, during a campaign swing through the southern state of Kerala, she said that India does not approve of a foreign presence in any country. Gandhi's government stunned foreign observers when its ambassador abstained in the U.N. General Assembly during a vote on a resolution deploring the Soviet assault and calling for immediate troop pullout.

Bani-Sadr, in a speech that also included the strongest Iranian condemnation of the Afghan invasion, called for national unity to resist the Soviets.

"They [the Soviets] want us to be divided rather than united so that they can capture the divided parts, as they did with Afghanistan, and reach the waters of the Indian Ocean.

"In their opinions, the Turks are a minority. The Baluchis, Persians and Arabs are also minorities, whereas we have been living together for centuries and have a common way of life and culture."

Bani-Sadr made the remarks in a campaign speech at the oil refinery city of Abadan, on the Persian Gulf, Wednesday night. The speech was published yesterday by the official Pars news agency.

While Iran's Revolutionary Council has consistently attacked the United States for its support of the deposed shah ever since Moslem militants seized the U.S. Embassy in Tehran and took more than 50 Americans hostage last Nov. 4, Bani-Sadr's condemnation of the Afghan invasion and his attack on Moscow suggest growing Iranian concern over Soviet moves in the region.

In another development reported by wire services from Iran, an Islamic clergyman read a resolution to a crowd of 100,000 in southern Tehran yesterday that condemned the Soviet action in Afghanistan and wished success to "the struggling Afghan brothers fighting for freedom and independence."

The resolution also endorsed the expulsion from Iran of "American spies disguised as journalists."

In his speech that contained the sharp attacks on the Soviet Union, Bani-Sadr also continued the attack on Washington, denouncing the "depredations of the United States all over the world."

Despite their Islamic ties with Afghanistan, Iranian revolutionary leaders have thus far been silent on the Soviet invasion, and Ayatollah Ruhollah Khomeini has made no public reference to it.

Earlier this week, the new, Soviet-installed Afghan leader, Babrak Karmal, sent a letter to Khomeini suggesting that the two neighbor countries should join together to combat "American imperialism" and expressed a desire to meet Khomeini personally "as soon as possible."

Bani-Sadr is the leading candidate to emergy in the campaign for Iran's first presidential elections Jan. 25. His chances of success appear to have improved by the withdrawal from the race of Jalaleddin Farsi, whose Afghan origins have disqualified him under the terms of the Islamic constitution.

The new Indian government initially stated that it had no reason to doubt Soviet assurances that the troops had been invited by the Afghan government and that they would leave the country at Kabul's request.

In an effort to limit reporting on the 50 Americans being held prisoner inside the U.S. Embassy in Tehran, the Iranian government has expelled American reporters, including those of The Washington Post. The Post will continue to report the seige of the embassy, which today entered its 76th day .