Tim Lambesis, frontman for Christian metalcore oufit As I Lay Dying, has pleaded not guilty to allegedly hiring an undercover detective to kill his estranged wife, the AP reports.

According to reports, the singer, 32, handed an envelope containing $1,000 in cash to an undercover agent and provided instructions--including photograph, address and security gate code--for killing his estranged wife. He reportedly also gave dates that he'd be with their children to give him an alibi. 

He was arraigned in North San Diego County Superior Court on a charge of solicitation of murder. A judge set bail at $3 million and said if Lambesis is released, he'll be forced to wear a GPS monitoring device and face strict travel restrictions.

The operation allegedly started after Lambesis twice told a man at his gym that he wanted his wife killed, complaining that she was keeping him from visiting their children and making it impossible to complete their divorce, the prosecutor said.

Lambesis' lawyer, Anthony Salerno, told reporters that his client was set up by the man at the gym. "Law enforcement was being fed something by someone that I strongly believe was a snitch, was out to save his own skin and was trumping things up, exaggerating things," Salerno said.

During the court hearing, the prosecutor pointed to an email from Lambesis to his wife, sent in August while he was on tour. He said he didn't love her, he wanted to end the relationship and he no longer believed in God. Meggan Lambesis reportedly soon learned her husband was having an affair and had been involved with "a string of women." 

In the divorce papers, his wife claimed Lambesis spent countless hours at a gym, thousands of dollars on tattoos and had fallen asleep while caring for their three adopted Ethiopian children near a pool. She also said Lambesis toured six months a year and had taken two last-minute trips in a month to visit a girlfriend in Florida.

"He is substantially motivated to kill his wife," the prosecutor said.

During the hearing, Lambesis was reportedly supported by is parents, Little League coach and some band members. 

Lambesis, who is expected to make bail, intends to ask the judge for permission to travel for As I Lay Dying's 30-date tour, scheduled to kick off May 30 in Oklahoma City.