A new California law designed to protect underage sex trafficking victims caused confusion after a Republican politician accused Democrats of legalizing child prostitution.

Read my oped that ran in the Washington Examiner today discussing the many harmful California Democrat policies... https://t.co/eJVzKbPlDa — Travis Allen (@JoinTravisAllen) December 29, 2016

"Beginning on Jan. 1, prostitution by minors will be legal in California. Yes, you read that right," Republican Travis Allen wrote in an article titled, “California Democrats legalize child prostitution,” Thursday. "So teenage girls (and boys) in California will soon be free to have sex in exchange for money without fear of arrest or prosecution."

Senate Bill 1322, came into effect on January 1, causing panic across elements of social media.

@JoinTravisAllen Thank you for exposing this. — Casey Bramble (@BrambleCasey) December 31, 2016

@dcexaminer unbelievable!!!!!!! When is cali supposed to slide into the pacific? — Sam Colson (@Colson6Sam) December 29, 2016

Yes, making it so pimps can't hold threat of jail over trafficked children's head makes it "easier" @dcexaminer@JoinTravisAllen — Megalovaniac (@stupidskeleton) December 30, 2016

@TruthFeedNews pedophile California after all the just legalised child prostitution two daus ago sick scum — AFREEBRIT (@AFREEBRIT) January 2, 2017

yes the party that legalized Child Prostitution in CA ,pediophiles are all overjoyed now,can't wait to see how many kids get trafficked in https://t.co/MFBfvluBNq — Lesslie Johnson (@lesslie_johnson) January 2, 2017

Why is the corrrupted media silent on SB1322 that does encourage minors prostitution in California ?? Democrats.r so desilusional — pilar (@superjosefa) January 2, 2017

Not everyone fell for Allen’s spinning of the law, however.

@JoinTravisAllen This is absolute trash, especially the fake headline. This law seeks to treat them as victims and get them real help now. — Jordan Michael Winn (@winnlosedraw) December 30, 2016 @JoinTravisAllen what in the world is wrong with you?! pic.twitter.com/RvcTpsEahA — Megan Carlisle (@megsraye) December 31, 2016 @JoinTravisAllen It means kids forced into prostitution will be treated as victims. That's GOOD, because THEY ARE victims. You fecal stain. — Lyonell Keplar (@DeadOnToilet) December 30, 2016

Legislation SB1322 protects underage victims of sex trafficking against prosecution, but does not stop the prosecution of pimps or those who pay for sex with children. The bill doesn’t change the law that allows authorities to remove a child from a situation they deem unsafe, such as being a victim of sex trafficking.

California Senator Holly Mitchell, who sponsored the bill released a statement debunking Allen’s claims.

I denounce false claims made by Republicans on my bill #SB1322 that decriminalizes sexually exploited minors pic.twitter.com/9r32LlDmM0 — Holly J Mitchell (@HollyJMitchell) December 31, 2016

@HollyJMitchell I have been clarifying SB1322 for people the past two days. As a victim of DMST from age 5-13 thank you and God Bless you! — Jerome Elam (@JeromeElam) December 31, 2016

While Allen’s article did point to the Democrat’s intentions to help victims of sex trafficking, he said the law would “only incentivize the increased exploitation of underage girls,” and called it the “tip of the liberal iceberg” that will see California “subjected to wave after wave” of such laws.