FILE PHOTO: Democratic candidate for Governor Tim Walz participates in a gun violence prevention roundtable with former Representative Gabby Giffords in Minneapolis, Minnesota, U.S., October 26, 2018. REUTERS/Brian Snyder

(Reuters) - Minnesota Governor Tim Walz on Thursday signed a law that repeals the state’s marital rape exception, which protected rapists against prosecution if they lived and had an ongoing sexual relationship with the victim.

Walz, a Democrat, signed the bill in St. Paul, saying that the “reprehensible exception should never have been part of our criminal statutes.”

The legislation was approved 132-0 by lawmakers in the state house and in the state senate by a 66-0 vote earlier this week.

A wave a marital rape laws were passed in the 1980s and 90s, making it a crime in all 50 states, but loopholes still existed in several states.

In Minnesota, the repealed law protected a rapist if he or she cohabited and had a voluntary sexual relationship with the victim or if he or she was the victim’s spouse. If the couple lived apart and one of them has filed for legal separation or dissolution of the marriage, the law did not apply.

Minnesota state representative Zack Stephenson, who was the author of the legislation, said in a statement the repeal of the “abominable law” was long overdue.

“This is a historic day. We’re moving Minnesota’s laws out of the 19th century,” he said.