LONDON, NOV. 14 -- Michael Heseltine declared his candidacy today for leadership of the ruling Conservative Party -- and hence for prime minister -- confronting incumbent Margaret Thatcher with the first such challenge of her 15 years as party leader and plunging Tory lawmakers into turmoil.

The former defense secretary faces an uphill contest against the prime minister, whom he has stalked ever since storming out of her cabinet in 1986. Nonetheless, he has momentum on his side after a devastating resignation speech Tuesday by her deputy, Geoffrey Howe, plus a growing fear among Conservative legislators that they could lose their House of Commons seats in the next general election unless they make a dramatic change.

Heseltine said divisions within the party over Britain's future role in Europe had prompted his challenge. But his brief declaration of his candidacy appealed primarily to his colleagues' instinct for survival by citing opinion polls indicating that he, not the three-term prime minister, stood a better chance of preventing "the ultimate calamity of a Labor government."

He sought to demonstrate that appeal by pledging "an immediate and fundamental review" of the so-called poll tax, Thatcher's highly unpopular new system of local taxation, if he is elected by the party's House of Commons caucus. It holds its first round of balloting next Tuesday.

"Mrs. Thatcher's outstanding contribution to the politics of our times is not in question," said Heseltine. "The issue now, however, is how best to protect what we have all achieved under her leadership."

Thatcher did not comment about the contest, which pits two mortal political enemies in a showdown likely to destroy the career of at least one of them. But her supporters and aides promised a vigorous defense against Heseltine, a millionaire publisher, and said she expected to win on the first ballot.

Even if Thatcher wins, some of her own closest allies conceded the leadership contest would damage her. She took office in 1979 and has served longer than any other British premier in this century.

Former party chairman Norman Tebbit said the questions accompanying Heseltine's challenge are "how much will he wound, and are we going to get this thing over quickly and cleanly next week, or is it going to drag on, causing more and more agony and damage to the party?"

Heseltine's backers say he has pledges of support from more than 100 lawmakers. They concede he has little chance of winning an outright victory in Tuesday's first round but say he hopes to deny Thatcher a victory and push the contest to a second round the following week.

Under Conservative caucus rules, Thatcher would need a majority of the 372 eligible legislators, plus 15 percent more votes than Heseltine -- 214 in all. But the numbers could be complicated by abstentions from those who believe it is time for Thatcher to go but who are unwilling to support Heseltine as her successor.

If Thatcher falls short on the first round, analysts say the pressure on her to step aside for a compromise candidate would be intense. But her aides insisted she would stay in the contest to the end.

"All elections are conducted according to rules, and if you win according to rules, that's it," said a senior Thatcher aide, who asserted that the prime minister would hang on to the office even if she won by only a few votes.

Thatcher, who is 65, and Heseltine, 57, are two of the party's dominant personalities, and each appears to have as many enemies as enthusiasts. Both face problems in constructing a coalition to win the leadership.

Thatcher's senior cabinet colleagues, many of whom stand to her left on policy matters, rallied around her today, but some analysts say they might urge her to step down if she does not defeat Heseltine in the first round. Some said it was significant that Foreign Secretary Douglas Hurd pledged his support to her for the first round but refused to rule himself out as a candidate if she fell short of victory.

But Heseltine is an equally divisive figure for many Tory lawmakers. They consider him too flamboyant and mercurial for the post of prime minister, citing his protest resignation in January 1986, when Thatcher thwarted his plans for a European consortium to take over a failing British helicopter firm.

Heseltine, whose politics are more centrist than Thatcher's, has spent nearly five years doggedly building support in local Conservative strongholds by giving speeches and campaigning for candidates. As Thatcher's popularity has plummeted, his has risen, according to pollster Robert Worcester of Market & Opinion Research International, who predicted that Thatcher would be removed as party leader before the next general election, due by summer of 1992.

"There is a political earthquake underway," William Powell, a Conservative lawmaker from a marginal seat, told BBC radio. "It is a Shakespearean tragedy of immense dimensions. None of us wish really to do this to the prime minister, but the fact of the matter is that the time has now come."