A Puerto Rican man has been jailed for 99 years after pleading guilty to the first-degree murder of a gay student.

Juan Martinez Matos, 26, admitted killing 19-year-old Jorge Steven Lopez Mercado in November.

Lopez’s body was found dismembered and burnt by a road in the city of Cayey.

Matos told police he hated gays but offered the victim cocaine to have sex with him, local newspaper Primera Hora reports.

He was due to go on trial next week but changed his plea at a hearing on Wednesday.

The case gained national attention because gay rights activists called for Matos to be prosecuted under new hate crime laws.

They wanted him to be tried under the Matthew Shepard and James Byrd Jr Hate Crimes Prevention Act, which offers federal protection against hate crimes motivated by homophobia and transphobia.

Pedro Julio Serrano, a spokesman for the National Gay and Lesbian Task Force, said: “Nothing is going to bring Jorge Steven back, but today, a bit of justice was done.”