LOS ANGELES (Reuters) - The lead singer in a heavy metal Christian rock band has been ordered by a California judge on Monday to stand trial for allegedly attempting to hire an undercover sheriff's deputy to kill his estranged wife.

Tim Lambesis, the 32-year-old lead singer in the band As I Lay Dying, will stand trial in San Diego County Superior Court in Vista, California, and faces up to nine years in prison if convicted.

He was arrested in May in Oceanside, north of San Diego, and charged with a count of soliciting the murder of his wife, Meggan Lambesis, who had filed for divorce a year earlier. They had been married eight years.

Lambesis has pleaded not guilty. His attorney has said that his client was set up and has never harmed his wife in the past.

Prosecutors allege Lambesis asked an undercover sheriff's deputy posing as a man named "Red" to kill his estranged wife.

The singer is accused of giving the man an envelope containing $1,000 in cash, photos of his wife, her address and codes to her home security system. He also allegedly gave the deputy a list of dates to carry out the murder when he would have their three adopted children with him.

Prosecutors have said that Lambesis intended to use being with their children as his alibi.

Lambesis is also alleged to have initially asked a gym acquaintance to help him find someone to kill his wife, but the acquaintance arranged for the singer to meet the undercover sheriff's deputy instead.

(Reporting by Eric Kelsey; Editing by Piya Sinha-Roy and Jackie Frank)