ALBANY, N.Y. — State lawmakers are considering barring doctors from performing so-called virginity testing, after widespread backlash followed the rapper T.I.’s recent disclosure that he takes his daughter to see a gynecologist every year to ensure that her hymen is still intact.

His comments last month sparked a national conversation around a procedure that scientists have long denounced as bogus and unsupported by evidence, as well as a violation of a woman’s rights.

The remarks also struck a nerve with some New York legislators.

“It made me angry and I was just very upset,” said Assemblywoman Michaelle C. Solages , a Democrat who introduced a bill last week to prohibit the practice. “To use your platform to say that you did this is just misogynistic and it sets the women’s movement back.”

The legislation would prohibit medical practitioners from performing virginity examinations, and would subject them to penalties for professional misconduct if they breach the ban. Virginity tests performed outside of a medical setting would be considered sexual assault under the proposal.