A court in Bangladesh sentenced two people to death and six others to prison Thursday in connection with the 2013 killing of an atheist blogger.

Attackers with machetes killed Ahmed Rajib Haider near his home during a surge in what has been years of violence, arrests and intimidation against writers accused of blasphemy.

The judge in the fast-track court in Dhaka gave the death sentences to two students, including one who was convicted in absentia.

Another defendant was sentenced to life in prison, while the others received between three and 10 years.

Press freedom and human rights groups have criticized Bangladesh's government, saying it has not responded quickly enough or with a strong enough message that attacks against bloggers will be punished.

Four bloggers and a publisher were killed in the South Asian nation in 2015, and dozens more have been publicly threatened by Islamist groups.