The sudden resignation of Rene Levesque as premier of Quebec late Thursday ended a political era highlighted by his campaign to separate the French-speaking province from the rest of Canada and make it an independent nation.

The resignation of the rumpled, 62-year-old former French Canadian television star, who had been premier since 1976, sets the stage for a pitched battle within Levesque's party to decide who will succeed him as leader.

Whoever wins will have to overcome a commanding lead in public opinion polls by opposition leader Robert Bourassa of the Liberal Party. Bourassa, Quebec's premier from 1970 to 1976, has rebounded in popularity by promising to turn around the province's economic problems that helped undercut Levesque's standing.

The timing of Levesque's announcement came as a surprise, but his departure had been widely predicted following a series of by-election losses and the party's slumping standing in opinion polls.

The slide in the fortunes of the Parti Quebecois, which Levesque founded in 1968 to promote the drive for independence, stood in marked contrast to its early success in establishing the primacy of the French language in the province.

That achievement, however, appeared to dampen popular ardor for formal secession. A 1980 referendum proposed by the Levesque government that Quebec enter into a "sovereignty association" with the rest of largely English-speaking Canada was defeated by a margin of 3 to 2. Recent polls indicate that as few as 4 percent in Quebec now favor independence.

Although many of the toughest laws of Levesque's government -- requiring the use of French in businesses, advertising, traffic signs and schools -- subsequently were struck down by Canadian courts, they were considered responsible for driving from Quebec the headquarters of more than 100 companies in the first three years of Levesque's tenure. That, in turn, served to aggravate the province's economic problems.

The unemployment rate in Quebec last month was 11.8 percent -- one of the highest in Canada -- compared with a level of 10.5 percent countrywide.

Quebec residents were stunned recently when the French company AMC-Renault decided to locate an automobile assembly plant in neighboring, English-speaking Ontario province. The French consul general, Renaud Vignal, said bluntly that Quebec missed its chance because the Ontario government "was intelligent enough" to offer generous subsidies.

Levesque, whose lined face and failing health caused many to come to feel that he had remained in power too long, has had a long and colorful career beginning as a war correspondent with the American armed forces in Europe during World War II. After the war he worked for Canadian broadcasting companies as a foreign correspondent and later as a popular television host on a weekly public affairs program.

He entered politics in the 1960s with the Liberal Party but, disenchanted, later brought together a collection of radical separatists, left-leaning social activists and right-wing Quebec nationalists to form the Parti Quebecois. He led them to an upset victory in 1976 and won reelection in 1981 after which support began to founder under the weight of a recession.

In the face of plummeting opinion polls and a string of by-election defeats, Levesque split the Parti Quebecois last November by announcing that the next election should be fought on economic issues, a major concern of voters, and not on separatism, an intense emotional issue of which Quebec residents appeared to have grown weary. Six of his hard-line Cabinet ministers and several other party officials later resigned from the government, forming a splinter party.

The beleaguered Levesque dismissed the revolt as "necessary surgery." But the turnaround appeared to do nothing to bolster support for either the premier or his party. Recent polls indicated that the Parti Quebecois led by Levesque would get fewer than a third of the votes in a general election compared with about 60 percent for the Liberals.

Levesque said in his resignation letter that he would stay on for another 90 days while a successor is chosen. Whoever wins will have to call an election by spring.