Updated

Wisconsin school teachers would have to promote abstinence and marriage over contraception in sex education classes, under a controversial bill passed by the state Senate on Wednesday night.

The Republican-backed legislation was passed 17-15 on party lines and will now head to the GOP-dominated state Assembly -- possibly as early as Thursday, the Wisconsin State Journal reported.

Democrats slammed the bill during floor debate, saying it would not give children the information needed to make responsible choices.

A state law was passed last year by Democrats, requiring schools that offer sex education to include information on contraception methods.

The new GOP-backed legislation would not ban teachers from discussing contraceptives, but would demand they stress abstaining from sex the only reliable way to avoid sexually transmitted diseases and unwanted pregnancies.

"We are trying to back away from the bill passed last year that we feel mandated sex ed that was too nonjudgmental, too explicit and at too young an age," said Republican state Sen. Glenn Grothman.

Democratic counterpart Sen. Jon Erpenbach said Wisconsin was "taking a step back to the Flintstone era" with the legislation.