A man accused of being Brazil's most prolific serial killer was sentenced Wednesday to more than 20 years in prison in the first of 42 possible trials for the slaying and mutilation of boys.

Francisco das Chagas Rodrigues de Brito, a 41-year-old bicycle mechanic, was given 19 years for homicide and one year and eight months for hiding the body of the 15-year-old victim, the court said in statement.

Chagas now faces trial for 41 other homicides between 1991 and 2003 in Maranahao and the neighbouring Amazon state of Para. Prosecutors say several victims were castrated. No date has been set for the next trials.

Chagas could have been sentenced to up to 30 years in prison for killing Jonathan Silva Vieira, but Judge Marcio Castro Brandao took account of testimony from psychologists that Chagas suffered from a mental disorder and was not completely in control of his actions, the court said.

The sentence was handed down after 2:30 a.m. local time following a trial that lasted just over two days.

At the trial's opening, Chagas confessed to killing Silva in December 2003, saying sexual abuse he suffered as a child drove him to kill. Chagas told judge he didn't remember details.

Chagas was arrested in 2004 and charged with the murders of two young boys whose bodies were found buried beneath the dirt floor of his shack in a poor neighbourhood. Vieira's body was found later in a wooded area.

During the trial, the victim's mother, Rita de Cassia Vieira, told the court her son had said he was going to pick fruit with Chagas on the day he was killed.

"The monster tried to help out the mothers of the children he killed because he was looking for victims," Vieira testified Tuesday.

She added that she showed Chagas a picture of her son after he disappeared and Chagas laughed and told her he hadn't seen him: "It seemed like he was laughing at my suffering."

The trial was held in the auditorium of a local club in Sao Jose de Ribamar, some 2,250 kilometres northeast of Rio de Janeiro, because the courtroom wasn't big enough to hold the hundreds of victims' relatives.

Prosecutors say they charged Silva with Vieira's murder first because it was the case in which they had the most evidence.

Chagas repeatedly has confessed and then retracted confessions to the killings of 30 boys in Maranhao state and 12 others in Para state between 1991 and 2003.

The slayings terrorized people in the two states, where many speculated the victims had been killed in black magic rituals because most of the boys had been found castrated.

Local human rights groups accused police of not doing enough to solve the crimes because most of the victims were poor.

To date, Brazil's worst confirmed serial killer is Marcelo Costa de Andrade, known as the Niteroi Vampire, who was convicted in 1991 of killing 14 children in a city near Rio de Janeiro.