SAN DIEGO (Reuters) - The lead singer for a heavy metal Christian rock band was sentenced on Friday to six years in prison for pleading guilty to trying to hire a hit man to kill his wife, prosecutors in California said.

Tim Lambesis, 33, lead singer for the band As I Lay Dying, had been in a custody dispute with his wife, Meggan, over their three children in May 2013 when he asked a personal trainer at his gym if he knew anyone who could kill his wife, according to charging documents in the criminal case.

The trainer contacted the San Diego Sheriff's Department, which sent an undercover detective to meet with Lambesis.

As part of a plea agreement with prosecutors, Lambesis admitted that he had paid the undercover detective $1,000 in cash for the murder, with an additional $19,000 to be paid when his wife of eight years was dead.

He also gave the officer photos of his wife, the address of her complex and codes for the security gates, and a list of dates when he would have their three adopted children with him to provide an alibi, according to court documents.

Lambesis had faced up to nine years in prison as part of the plea agreement.

The four remaining members of As I Lay Dying have announced they have formed a new band called Wovenwar, with a new singer.

(Reporting by Marty Graham; Editing by Dan Whitcomb and Mohammad Zargham)

[Image via KFMB-TV]