“A COUP by instalments” is how a European diplomat describes efforts by Sheikh Hasina, Bangladesh’s prime minister, to extend her rule. The main opposition is to boycott a parliamentary election on January 5th. So Sheikh Hasina’s party, the Awami League, is assured of victory. Legitimacy is another matter.

More than 100 people have died in political violence in the run-up to the vote. The latest deaths came after the execution on December 12th of Abdul Quader Mollah, a leader of Jamaat-e-Islami, an Islamist party. He was convicted, by a popular but deeply flawed tribunal, of war crimes during the bloody secession from Pakistan in 1971. On December 16th Bangladesh celebrated Victory Day, the end of the war. But hopes that Bangladesh might come to terms with its violent birth without spilling more blood have evaporated.

Sheikh Hasina’s unpopular government has lost control of large parts of the country. The main opposition Bangladesh Nationalist Party (BNP), led by Sheikh Hasina’s nemesis, Khaleda Zia, conducts its politics in the streets. It has been calling one general strike after the other, crippling the transport system and the economy. Its ally, Jamaat, is fighting for its sheer survival. Its hooligans, known for punishing political foes by cutting their tendons, now engage in outright murder. The security forces have responded with live fire. On December 16th they killed five Jamaat supporters in Satkhira, a district that, like many Jamaat strongholds, borders India. In the north, members of Jamaat’s youth wing have burned down homes and shops owned by members of the Hindu minority. League cadres have fled the countryside to the capital, Dhaka.

People close to the prime minister say she is determined to see death sentences carried out on the entire Jamaat leadership. Few credit the judiciary with independence. Foreign notables such as the UN’s secretary-general, Ban Ki-moon, and America’s secretary of state, John Kerry, have asked Sheikh Hasina to stop the executions. But compromise is not her style.

She won a landslide election victory five years ago. In 2011 the constitution was amended to get rid of a provision, introduced in 1996 because of the chronic mutual distrust between the two big parties and their leaders, for neutral caretaker administrations to oversee elections. Sheikh Hasina did not deliberately set out to become an absolute ruler. But that is a likely consequence of the amendment. Ever since, the government has weighed the pros and cons of an uncontested election.

The biggest disadvantage is that the poll will be an obvious sham. Of 300 elected parliamentary seats, 154 will be uncontested. The BNP and 17 of its small allies are joining the boycott. The government has detained in hospital and seems poised to exile Mohammad Hossain Ershad, a former dictator and the leader of Jatiyo, the third-largest party, for its boycott. The next-biggest party, Jamaat, has been banned from taking part on the ground that its overtly religious charter breaches Bangladesh’s secular constitution.

At least the League will win. Whatever happens on January 5th, there will be enough MPs for parliament to swear in Sheikh Hasina as prime minister. The result may lack legitimacy at home and abroad. Yet India, Bangladesh’s giant neighbour and the only foreign power that could have swayed the decision to go ahead with a vote, chose not to intervene.

However, India’s decision to give its implicit backing to an election with a predetermined result (a concept pioneered by Mr Ershad in the 1980s) may prove short-sighted. Anti-Indian sentiment in Bangladesh has already surged. And as conflict worsens, India’s ally, the League, risks being seen as anti-Islamic. Backing Sheikh Hasina’s power grab is likely to give India the opposite of what it wants: a more radical and less secular Bangladesh.

The army is not keen to step in, as it did to back an unelected “technocratic” administration that ruled for two years from January 2007, after Mrs Zia tried to hijack an election. Nor will foreign powers tacitly back a coup as they did then. So fighting could drag on for months. Eventually, as even some League politicians concede, a proper poll will have to be held. According to an opinion poll, only 30% of Bangladeshis want the generals to take over. And remarkably, if they did and held another election, only one-third would want the two “battling Begums” barred from politics. Badly as they serve their country, it cannot seem to do without them.