An Iowa man whose speech defending the same-sex marriage of his two moms went viral in 2011 has secured the Democratic nomination in his state Senate race.

Zach Wahls won the primary for State Senate District 37 seat on Tuesday, the Iowa City Press-Citizen reported.

Wahls finished with 59.8 percent of the vote out of the four candidates.

ADVERTISEMENT

Janice Weiner came in second with 34.8 percent, followed by Eric Dirth with 2.8 percent and Imad Youssif with 2.6 percent, the newspaper reported.

We won. — Zach Wahls (@ZachWahls) June 6, 2018

Wahls made headlines in 2011 when he gave a powerful speech to members of the Iowa House of Representatives’s Judiciary Committee during a hearing on a proposed constitutional amendment to ban gay marriage.

The video went viral and has been viewed more than 19 million times on YouTube. It was the site's most-watched political video that year.

Wahls, now 26, has since become an outspoken advocate for LGBTQ rights.

He leads a campaign called Scouts for Equality to allow gay and transgender children to join the Boy Scouts, the Press-Citizen reported.

When he announced his campaign in December, Wahls outlined a platform that focused on affordable higher education, Medicaid expansion and mental health care.

IOWA — Remember that young man from Iowa who spoke to the Iowa legislature a few years ago about growing up with two moms? Hi. That was me — and today, I'm announcing my campaign to join the Iowa legislature. I hope you'll support our campaign. https://t.co/jrEleWPyWk — Zach Wahls (@ZachWahls) December 21, 2017

“I am incredibly conscientious of the fact that I am a straight white guy running in the Me Too moment,” Wahls wrote on Twitter. “I am running because I believe all Iowans need a seat at the table. That absolutely means more women running, it means more young people, it means more people of color. This is an all hands on deck situation that is going to determine the future of our state for generations to come — and all hands means all hands.”

Wahls will face Libertarian candidate Carl Krambeck for the western Iowa seat during the November general election.

The position is being vacated by state Sen. Bob Dvorsky (D) who is not seeking reelection.