A bill to ban gay-conversion therapy for kids has been rejected by Republicans that control the state Senate.

The bill would have banned therapists from trying to change the sexual orientation or gender identity of children. It was rejected 3-2 on a party-line vote in a Senate committee Wednesday.

The bill earlier passed in the House, which is controlled by Democrats.

The measure would have forbidden therapists from trying to change the sexual orientation or gender identity of a person under 18. Therapists who do not follow the rule would face disciplinary action from their licensing board.

A Republican who voted against the ban said it would have limited choice by people who want gay conversion therapy.

Also on Wednesday, the White House said it supports efforts to ban such therapies.