DHAKA, BANGLADESH, NOV. 10 -- Thousands of opposition activists clashed with police and security forces in Dhaka today, leaving at least four persons dead and scores of others injured.

The clashes were an outgrowth of opposition demands for the resignation of President Hussein Mohammed Ershad and threatened to continue following a call by opposition leaders for a nationwide general strike on Wednesday.

Heavily armed police and paramilitary forces fought running battles with demonstrators in parts of the capital for more than four hours, in violation of a ban on marches and rallies in the capital imposed yesterday by the Ershad government.

Witnesses said police opened fire and lobbed tear-gas grenades during a number of incidents, but Interior Minister Abdul Matin said police had opened fire only once, in self-defense when demonstrators began throwing bricks and molotov cocktails.

Demonstrators set fire to a number of buildings, including the general post office.

The two major opposition leaders, Begum Khaleda Zia of the Bangladesh Nationalist Party and Sheik Hasina Wazed of the Awami League, vowed to continue the protests, which they call the "siege of Dhaka."

According to one report, Zia was the target of several molotov cocktails thrown at one procession she was leading.

The test of wills in the capital of this nation of almost 100 million is an unusual challenge for power in a country marked by political instability since Bangladesh was declared independent in 1971. The two major opposition leaders are a widow and a daughter of former presidents who were killed in office.

Ershad seized power in 1982 and ruled as president and chief martial law administrator. He won a vote of confidence in a disputed referendum in 1985 and an equally disputed parliamentary election last year.

The current challenge, however, represents the first time the two major opposition groupings have joined in an effort to topple the government.

Bangladesh, one of the world's poorest countries, has been shaken by severe flooding which has tested the government's ability to provide minimum services.

Government spokesmen have noted that a critical issue in the current strike is the government's ability to get new seeds to farmers in the final days of the current planting season.

Tension has been building throughout the country over the past several days, especially in Dhaka, a city of almost 4 million. Officials said Sunday that 6,000 additional police and paramilitary forces have been deployed in the capital.

Many students have refused to obey a government order closing the city's colleges. At least 5,000 activists, including five members of parliament, have been arrested in the past 2 1/2 weeks. Officials admit to holding 1,046 persons.

The strike call has brought buses, trucks and boats to a near halt over the past several days.

The government also reportedly has restricted the movement of trains to prevent people from coming to the capital for the protests.

The opposition has mounted four other challenges to the Ershad government over the past six years but has never before been united.

The key to Ershad's firm grip on power, according to one western observer, has been his ability up to now to keep the opposition divided while retaining the loyalty of the military.

So far, there has been no suggestion of a break between Ershad and the military, although the opposition's unified actions present what political observers call an unprecedented set of problems for him to surmount.