The election of the next U.N. secretary general was thrown open today as the last candidate in the six-week impasse, Tanzanian Foreign Minister Salim A. Salim, stepped aside.

Salim announced at a press conference here that he would temporarily withdraw his name from the balloting, and the Security Council promptly gathered to consider new contenders.

The other original candidate, incumbent Kurt Waldheim, who was seeking an unprecedented third five-year term, pulled out of the balloting last Thursday.

But since Salim was the nominee of the African nations and the nonaligned movement, other candidates were reluctant to jump in as long as he remained in the race.

The latest move by Salim, who, like Waldheim, indicated he remains available for a draft, is expected to bring forward as many as a score of hopefuls, virtually all from the Third World.

The 15-nation council had deadlocked on 16 ballots during the last six weeks, as the Chinese continually vetoed Waldheim and the United States blocked Salim.

The Tanzanian said that the determined American opposition to him "is something which I fail to understand."

The council president, Olara Otunnu of Uganda, announced tonight that candidates would be given until 6 p.m. Wednesday to come forward and said that the council members would have until Friday to get voting instructions from home.

Some council members had hoped for an informal sounding-out process before voting begins to see if there is one person who might attain the requisite nine-vote majority and escape a veto. But time is pressing the council because the General Assembly, which must ratify the nominee for secretary general, is scheduled to adjourn Dec. 15.

But Otonnu suggested that it would be "impractical" to do this, and that balloting on the new names would begin Friday.

The burden in this next round is likely to fall on the Soviet Union. Washington and Peking are believed to be amenable to several of the new candidates, but most diplomats believe Moscow would like to hold out for an extension of Waldheim's current term, which expires Dec. 31.

China, however, maintains its opposition to any extension for Waldheim, and it would be politically awkward for the Soviets to veto all the new Third World contenders.

Among those believed to have the best chance to escape a veto are Javier Perez de Cuellar of Peru; Mexican Foreign Minister Jorge Castaneda; Kenneth Dadzie of Ghana, the U.N. director general for development and international economic cooperation, and Prince Sadruddin Aga Khan, the former U.N. High Commissioner for Refugees.

The strength of diplomatic technicians such as Dadzie and Perez de Cuellar lies in the fact that -- like Waldheim 10 years ago -- nobody is set against them and they are not seen as threats to the interests of any power bloc.

It would be awkward for Washington to veto Castaneda -- figuratively the man from next door. Yet he has demonstrated within the Mexican spectrum that he is not subservient to the Americans.

Sadruddin -- an international figure with an Iranian passport and a Harvard degree -- has support from the West, as well as a record of dealing equitably with all blocs on delicate refugee questions.

As of today, the four names officially before the council were de Cuellar, Sadruddin, Carlos Ortiz de Rosas of Argentina and Commonwealth Secretary General Shridath Ramphal of Guyana.