Hafeez, a liberal academic, was arrested for blasphemy in 2013 and has been in solitary confinement since 2014. An Islamist group lodged the accusation against him to prevent his promotion to a permanent faculty position. He was sentenced to death in 2019. On March 19, 2025, the Lahore High Court heard his appeal against the death sentence. The outcome of this hearing has not been publicly disclosed.