WHEN MARGARET THATCHER became prime minister of Britain, she had a much larger purpose than merely to govern. She intended to transform her country.

As a politician she represented an outraged reaction to three decades of steady economic decline relative to Britain's European rivals, particularly France and Germany, which by the late 1970s were conspicuously richer. A great many British voters, by no means all of whom belonged to her Conservative Party, were fed up with the old politics of compromise, accommodation and toleration of inefficiency. There was a rising resentment of the erosion of British power and standing. Those were the forces that launched Mrs. Thatcher's remarkable career.

She was prepared to defend British interests fiercely and if necessary with force -- as the Argentine generals discovered to their dismay in the Falklands. But her crucial battles were at home, particularly with labor unions and the far-left, quasi-Leninist leadership entrenched among the most militant of them. Some had begun to operate routinely outside the law and the rules of industrial democracy. The people who called the miners' strike of 1984 never deigned to put it to a vote of their own membership. Mrs. Thatcher fought them, won and ended the anarchy of British labor relations.

She sold public enterprises to private owners and sold public housing to its tenants. She herself embodied the values that she labored to impose on her country: courage, discipline, self-reliance.

But as time passed, her exercise of power seemed to grow more personal and less open to argument. She had largely won her struggle with the left but, to make it harder for left-wing majorities in local governments to raise revenues, she insisted on shifting from property taxes to the highly regressive poll tax that went into effect last spring. It was not only the most unpopular tax of this century and a major tactical error.

It also showed Mrs. Thatcher at her worst, vindictive and not much interested in social equity. Similarly, she had her party with her when she fought the European Common Market over financial formulas that were unfair to Britain. But when her position developed into a hard, visceral hostility to all things European, her allies began to leave her. That was the immediate cause for the rebellion that is now forcing her to resign.

To judge Mrs. Thatcher's revolution it will be necessary to see how much force it retains after she has gone and whether the pattern of British economic growth is permanently changed. But one achievement is beyond argument. She persuaded a country that in 1979 was dispirited and deeply divided that it did not have to sink passively into mediocrity. She fundamentally changed the atmosphere of British politics and set a standard of intrepid leadership that her successor will be hard pressed to equal.