Democratic state Sen. Gary Farmer easily won his primary battle against former state Rep. Jim Waldman, taking 70 percent of the vote.

More than $200,000 was spent on attack ads calling Farmer “sexist” and “obnoxious,” but a poll showed that attack backfired, making Farmer more popular, Florida Politics reported.

Outside groups also spent money blasting Farmer for voting against a school safety bill that included gun control measures, but Farmer said he did so because the National Rifle Association supported parts of it, the Sun Sentinel reported earlier this month.

Farmer won the endorsement of LGBT rights organization Equality Florida. Farmer was first elected to the Florida Senate in 2016, where he also beat Waldman.