OLYMPIA — A divided state Senate voted Wednesday to eliminate the death penalty, a policy voters overwhelmingly backed and lawmakers put on the books four decades ago.

Under Senate Bill 6052, capital punishment is replaced with a sentence of life in prison without the possibility of parole.

The death penalty has been state law since 1981. Of the 33 people sentenced to death since then, five have been executed, two from Snohomish County.

Eight people now are sentenced to die for crimes in Washington. One of them is Byron Scherf, an inmate who received a death sentence for the 2011 strangling of Monroe corrections officer Jayme Biendl. Scherf already was serving a life sentence when he attacked Biendl.

Gov. Jay Inslee supports getting rid of the death penalty and in 2014 put a moratorium on executions.

The bill passed 26-22 as five Republicans joined 21 members of the Democratic caucus to send the bill to the House for consideration.