The violence occurred on Thursday evening at Shibganj village in Chapainawabganj district, 230 kilometers (145 miles) northwest of national capital Dhaka, a local police official said.
More than 2,000 people were involved in the clashes. Both sides used homemade bombs, meat cleavers and sticks, said the official on condition of anonymity because he was not authorized to speak to the media.
He said police recovered the bodies of four men following about three hours of fighting that stopped after baton-wielding police arrived.
At least 20 injured people were being treated at the local hospital, the official said. About 30 others received first-aid treatment.
The police official did not provide details about how the violence started.
But private television station ATN Bangla reported that nearly 1,500 farmers rallied Thursday evening in a soccer field at Shibganj village to protest frequent power outages that they say hamper irrigation for rice crops.
At the same time about 500 members of Prime Minister Khaleda Zia’s Bangladesh Nationalist Party gathered close to the rally accusing the farmers of being used by opposition parties.
Soon the two groups were locked in fighting, the report said.
Bangladesh has been hit by frequent power outages because of shortage of electricity. Farmers who need power to run irrigation pumps are among the worst sufferers.
The government says the country produces about 3,600 megawatt electricity a day, about 1000 megawatt short of the demand.
Only 35 percent of Bangladesh’s 140 million people have access to electricity, according to the World Bank.