LAHORE, Pakistan — A Pakistani court has upheld death sentences for three Muslims but acquitted two others in the 2014 mob killing of a Christian couple accused of blasphemy in the eastern city of Lahore.

Thursday’s ruling comes five years after Shahzad Masih and his wife Shama Bibi were beaten to death and thrown into a brick kiln in the eastern town of Kod Radha Krishan in Punjab province.

Shortly after the incident, police arrested scores of people and five of them were charged and sentenced to death in 2016.

Under Pakistan’s harsh blasphemy laws, anyone accused of insulting God, Islam or other religious figures can be sentenced to death. However, domestic and international human rights groups say these laws are often misused to settle personal scores.

Last week, a Christian woman acquitted of blasphemy after spending eight years on death row in Pakistan, but who still faced death threats from Islamic extremists upon her release, flew to Canada to join her daughters, Pakistani officials and others involved in the case said.

Aasia Bibi was convicted of blasphemy in 2009 after a quarrel with two fellow farmworkers, who refused to drink from the same water container as a Christian. Five days later, the women said Bibi had insulted Islam, a crime punishable by death. Bibi was charged with blasphemy despite repeatedly denying the accusation. The Supreme Court overturned her conviction last year, and she had been in protective custody since then.