A state senator from Windham wants Maine to reinstate the death penalty for perpetrators of violent sex crimes against children, an effort that is certain to be controversial.

Newly elected Democratic Sen. Bill Diamond said his bill, which is still being crafted by the Revisor of Statutes Office, would apply only to someone convicted of murder in connection with a sex crime against a child.

Diamond, who served nine terms in the Legislature and last left the Senate in 2012, said his bill would give a state or federal judge the option of sentencing a child killer to death, but he emphasized the execution would take place at a federal facility outside the state.

Diamond, the former Maine secretary of state, said his legislation was prompted by a child pornography industry that is flourishing across the nation and in Maine. Diamond, who wrote a book on the topic and is a former co-chairman of the Legislature’s Criminal Justice Committee, said children are often sadistically abused, tortured and in some cases “snuffed” by predators who make profits by selling images or films of child pornography.

“I’d like to send a message that says if you do this in Maine you will be subject to paying the ultimate sacrifice – your life,” Diamond said Tuesday night in a telephone interview.

Maine abolished the death penalty in 1887.

Previous attempts at reinstating the death penalty in Maine have failed, but Diamond said he believes this effort could succeed because it targets a specific class of criminal.

Under current state law, the maximum penalty for a person convicted of murdering a child in connection with a sex crime is life in prison.

“These child predators are not who you think they would be. They are police officers, teachers and members of the clergy,” Diamond said.

Diamond is the author of “The Evil and The Innocent,” a paperback published in 2012. The book presents an inside look at the tragedies and suffering of the victims of sexual assault.

Diamond said he realizes that his bill will stir controversy and attract its share of opponents. He has yet to consult with the state’s top legal expert, Attorney General Janet T. Mills, about the details of implementing the measure.

Under Diamond’s plan, a person charged with killing a child in conjunction with a sex crime could be prosecuted in state or federal court. He said federal courts, regardless of jurisdiction, always have the option of imposing the death sentence. His law would give a Maine judge that option as well.

In an email to the Portland Press Herald on Tuesday night, Mills said she will withhold comment on Diamond’s bill until she has seen the language. The bill is still being written and probably won’t be reviewed by a legislative committee for another four to six weeks. After it is reviewed, it will go to a public hearing.

Mills believes that a life sentence serves the same purpose as the death penalty.

“Unlike many states that have the death penalty, Maine does not have parole,” Mills said in the email. “There’s a big difference when a life sentence really means life. Sentences in Maine for violent crimes are definite sentences and they are pretty punitive.”

In a separate interview with the Maine Public Broadcasting Network published Tuesday, Mills said sex offenders in general and child sex offenders in particular are not treated well by their fellow inmates.

“If the crime involves a child, or sexual circumstances, I can tell you anecdotally from prison, the corrections community, that a life sentence can be a very hard life sentence,” Mills was quoted as saying.

Zach Heiden, legal director for the American Civil Liberties Union of Maine, said his organization will vigorously oppose Diamond’s bill.

“Maine abolished the death penalty more than 100 years ago. There is no reason for Maine to revisit that issue now,” Heiden said Tuesday night.

Heiden said more often prisoners on death row are there because they are poor or did not have good legal representation. He claimed that many people who end up being executed were falsely convicted.

“The death penalty is not only immoral, but it’s a misguided approach to criminal justice,” Heiden said.