Image copyright AP Image caption There have been large demonstrations in recent months in Bangladesh calling for the death penalty for war crimes suspects

Facebook and other social networks in Bangladesh have been blocked after the Supreme Court upheld the death sentences of two men convicted of war crimes during the independence struggle against Pakistan in 1971.

An official said the sites were blocked to maintain order following the ruling.

Salahuddin Quader Chowdhury and Ali Ahsan Mohammad Mujahid face imminent execution.

They were convicted of genocide and rape by a special war crimes tribunal.

Officials at the Bangladesh Telecommunication Regulatory Commission said that Facebook, Facebook Messenger, Viber and WhatsApp services were all blocked.

Image copyright AFP Image caption Ali Ahsan Mohammad Mujahid (pictured, left) and Salahuddin Quader Chowdhury maintain their innocence

Image copyright Getty Images Image caption Supporters of the Jamaat-e-Islami party say the war crimes cases are being used as a tool to persecute their leaders

Image copyright Getty Images Image caption Bangladeshis who fought in the 1971 war of independence against Pakistan have been at the forefront of rallies calling for war crimes suspects to be executed

Attorney General Mahbubey Alam was quoted by the AP news agency as saying that the court's dismissal of appeals by the two men cleared the way for them to be hanged unless they were able to obtain presidential clemency.

The men's lawyer was quoted by the AP as saying he would be consulting them soon about seeking a clemency option.

A former minister, Chowdhury is a member of the opposition Bangladesh Nationalist Party and the most senior leader from the party to be sentenced for crimes against humanity.

Two years ago, the tribunal found him guilty of nine out of 23 charges including genocide, arson and persecuting people on religious and political grounds.

Chowdhury, 66, denies all the charges. His family alleges that he has been tortured while in custody and that his health has deteriorated.

Mujahid, 64, is the secretary-general of Jamaat-e-Islami and an influential figure within the party. He was sentenced to death in July 2013.

Critics of Mujahid say he was responsible for the killings of a number of pro-independence Bangladeshi leaders and intellectuals.

He strongly denies the allegations but the tribunal found him guilty of five charges, including abduction and murder.

Jamaat-e-Islami has called for a general strike on Thursday to protest the court's decision.

While the government says war crimes trials are necessary to bring murderers to justice, the opposition says they have been a tool to persecute them.

Human rights groups have criticised the war crimes tribunal, saying it does not meet international standards.

Bangladesh independence war, 1971

Image copyright Getty Images Image caption The 1971 war lasted only a few months but was fought brutally and bitterly

Bangladesh war crimes trial: Key accused