Primary challengers claimed their first victory against establishment Republicans on Tuesday night in North Carolina, where incumbent Rep. Robert Pittenger lost the nomination to successful challenger Mark Harris.

Harris, a conservative former senior pastor of Charlotte’s First Baptist Church and former president of the North Carolina Baptist Convention, won the contentious Republican primary in North Carolina’s Ninth District, in what was a rematch of a close 2016 race.

Two years ago, Pittenger managed to hold on to the district by just over 130 votes. Despite some early favorable polling, the North Carolina Republican, who has served in the House since 2013, wasn’t able to hold on to the district again.

His loss is a story of both North Carolina’s heavy gerrymandering and the tensions between the establishment Republican Party and more conservative base.

NC-9 is a heavily suburban and gerrymandered district around Charlotte; the district lines were redrawn just before the 2016 elections, opening the race to not only a challenge from Harris but also a strong third challenger that ate away at Pittenger’s voter base.

This year, Pittenger largely outspent Harris but still fell short to the conservative challenger, who tried to paint the incumbent as a “Republican liberal” and attacked him for voting for Congress’s massive spending deal, “mortgaging the future of our kids and our grandkids.”

Harris, who was a leader in the successful 2012 push to pass a state constitutional amendment reaffirming North Carolina’s same-sex marriage ban (which was rendered moot by the US Supreme Court decision), has been a name in North Carolina politics for a while. He ran a failed bid for US Senate in 2014 and for the district House seat in 2016.

He’s finally surpassed the primary hurdle, but he could face a tougher general election than expected. While the district still leans Republican, it’s one of two districts Democrats are eyeing to flip in a wave election year.

The Democrats elected Dan McCready, a Marine Corps veteran and solar energy entrepreneur who has been compared to Pennsylvania’s Conor Lamb.