Lech Walesa and Prime Minister Tadeusz Mazowiecki, once steadfast allies, will put their political dispute to the voters in the country's first direct presidential election.

Ending weeks of doubt about his intentions, Mazo-wiecki declared Thursday that he will oppose Walesa, his former adviser, in the election on Nov. 25. They are vying to succeed former Communist leader Gen. Wojciech Jaruzelski.Walesa announced his candidacy Sept. 16. Since then, he has lined up the endorsement of the Solidarity trade union - which he leads - several small center-right Christian-Democratic parties and his own Center Alliance party.

Mazowiecki is supported by a new party, Citizens Movement for Democratic Action, and much of the intellectual elite that once belonged to Solidarity.

As the East bloc's first non-Communist prime minister, Mazowiecki introduced the region's most radical economic reform plan in January. He has taken a step-by-step approach to dismantling other aspects of the old regime.

Walesa, who sponsored Mazowiecki for prime minister, has accused him of moving too slowly.

Mazowiecki said Thursday he will run for president because Poland should not stray from the course it has set.

As prime minister, Mazowiecki is responsible for running the government, and he is answerable to parliament.