Bangladeshi President Hussein Mohammed Ershad ordered the lifting of martial law today after parliament passed legislation protecting him and others from prosecution for actions taken under 4 1/2 years of military rule.

Ershad, who was elected president for another four years in a disputed election on Oct. 15, told the nation in a televised address that the country's 1972 constitution was being restored but he warned the opposition that the government would not tolerate lawlessness.

The eight-party opposition alliance under Awami League leader Sheik Hassina, daughter of Sheik Mujibur Rahman, the assassinated first leader of independent Bangladesh, boycotted today's session of parliament, which was tightly controlled with little opportunity for debate.

A second opposition grouping, under Nationalist Party leader Begum Khaleda Zia, along with other parties from both the right and the left of the political spectrum, called a half-day countrywide general strike in support of their demands for Ershad's resignation and new elections. One youth was killed and many others injured when police opened fire on the campus of Dhaka University.

By all outward expectations, the lifting of martial law would be an occasion for rejoicing, but Dhaka in recent weeks has been a place of deep suspicions and unease over the political prospects for the coming months.A questionable election process has further embittered the country's opposition politicians, the small but influential middle class finds the regime increasingly mired in corruption and even Cabinet members seem unsure about the role Ershad has in mind for the military now that martial law formally has been withdrawn.

One thing is certain: as in other countries that have made the shift from overt military rule recently, such as Turkey and Brazil, the Bangladeshi armed forces will continue to have a considerable say in the country's politics.

In its 15 years of independence, Bangladesh has seen two of its leaders assassinated and governments repeatedly toppled by military intervention. Its status as the world's eighth most populous country, and its second poorest, has not been made any easier by the resulting political turmoil.

Few if any observers in Bangladesh today see any possibility of insulating the country from the influence of the military. The thinking seems to be not how to keep the military out, but rather how to keep it in, albeit indirectly.

"There are two major factors in politics in this country: the civilian and the military," one Cabinet minister noted in a recent interview.

"Unless the two political factors can arrive at a consensus, we do not have a future. We have tried every western form of government and none has succeeded. Maybe the lesson is that you can't adopt a system from another country. We have tried five arrangements. None has worked and the present one is limping."

In Bangladesh, the military and the party created by Ershad while still head of the Army hold the upper hand over a divided and ineffective civilian opposition.

"Under Ershad we have a unified armed forces, at least a disciplined armed forces. He has emerged as their spokesman. Somehow this man has kept the Army together and has expressed their view in politics," the Cabinet minister said, although he conceded the formula for the future was not clear.

At a press conference after last month's presidential election, Ershad spoke of developing a system that gives the military a continuing say in national policy. He refused to say how he intends to do this, but confidants speak of a national security council that would have powers over nonmilitary as well as military issues.

Whether courts will be free to operate without intimidation, whether the press will be unfettered and the opposition given room for free expression remain unclear.

Popular beliefs that too much of this nation's poor resources go to the military, and that official corruption is widespread, pose problems for Ershad, as was illustrated by his reaction to a recent article in the London Observer newspaper. The article, which circulated widely in photocopy form in Dhaka, outlined spectacular accounts of Ershad trying to cover up a second marriage (permissible under Moslem practice), of his claiming fatherhood of a child who actually was adopted and of alleged widespread corruption in his administration.

Whether the charges were true or not, they were widely believed. Numerous people interviewed at the time, including several in government, pronounced them fully credible -- a reaction that quickly raised worries in the Ershad camp, according to neutral observers.

"There was fear that the article could have an impact on the [military's] lower and middle ranks," said a diplomat. "Efforts were made to stop its dissemination . . . and meetings were held to counter it."

The article was harmful in particular, this analyst said, because of a standing public perception that Ershad has an eye for women, allows too much corruption and is less moral than his predecessor, assassinated in the coup that brought Ershad to power.

Within the military, with its own code of ethics and its desire -- outward at least -- to keep a clean image, there was danger of a backlash, the diplomat said. "Ershad has improved the discipline of the Army, but he still must retain support," he said.

Thoughtful figures in the opposition fear that the country's long-term chances of escaping from the cycle of desperate poverty and instability are undercut by dwindling civilian job opportunities, skewed use of resources and a political system geared toward keeping the military satisfied.

"Democracy, real democracy, has never been tried in this country. We had fair elections in British times, but with a limited franchise," said one opposition intellectual.

He said the current system places former generals in charge of public-sector corporations when they retire, freezes civil service hiring while keeping the military's job roles open and sanctions dishonesty in government. Neutral observers agree that there is corruption -- "a lot of it," said one -- and there are those who say it is infecting all areas of life.

Ershad himself indirectly admitted the problem at his postelection press conference, when he said he would work to minimize corruption even if it could not be eliminated.

"Everyone feels free to cheat when the leadership cheats. Merchants in villages give short weights on their sales," said one man who had just spent time in his native town in a rural area.

Some people believe change will come only when the outside props for the system -- such as the vital foreign aid Bangladesh receives from western governments and international agencies -- are removed.

"Aid takes care of the necessities -- food imports, loan repayments, etc. -- so other resources can be diverted to the Army and police," said one critic. "This government would not last a week if any major donor decides to cut back."

Others offer more drastic antidotes, giving up on any democratic models and crying out for a puritanical military strongman, regardless of ideology.

"The Americans won't like it," says one, "but maybe we need a [Moammar] Gadhafi or [Kemal] Ataturk, someone who is clean and comes and asks all those people making the equivalent of $ 100 a month how they got all those fancy houses."

Special correspondent Nurul Huda in Dhaka contributed to this report.