Washington CNN  — 

A political newcomer knocked off Lexington Mayor Jim Gray – a prized Democratic recruit and major figure in Kentucky politics – in a primary for a US House seat Tuesday.

Amy McGrath, a retired Marine fighter pilot, won the Lexington-area 6th District contest and is now poised to take on Republican Rep. Andy Barr in a red-leaning district that Democrats hope will shift in their favor in November’s midterm elections.

Gray conceded the race Tuesday night.

“I want to congratulate Amy McGrath on her victory and her win tonight,” Gray said at his election night event. “It was a spirited campaign, and I know that Andy Barr is in for the fight of his life. I am ready to help Amy and I want all of you to join me. It’s time for us to stand with Amy and continue this effort to do all we can to send her to Washington.”

The win for McGrath is the latest evidence of a political climate in which voters are eager to cast out those they see as figures of the political establishment. It also showed the strength of female candidates amid the “Me Too” movement.

McGrath told CNN on Sunday that Gray is a “sort of standard politician. He’s a good guy and he’s a good public servant. There’s a sense of, he’s not right, right now. There’s a sense that we need somebody different.”

“It’s more, this time, this climate, right now,” she said. “It’s very clear that people are looking for more women. It’s very clear that people are really interested in candidates who aren’t necessarily – that didn’t grow up within the political party.”

Gray, who had built a family construction business into a global firm and is one of the first openly gay Kentuckians elected to public office, had rejected accusations that he was a figure of the establishment.

In an attack ad just days before the election, Gray pointed out that McGrath – who just finished 20 years of active-duty military service – had just moved into the district months before launching her run for Congress.

Gray was recruited by the Democratic Congressional Campaign Committee, but over the course of the campaign some Democratic strategists came to view McGrath as the stronger national candidate.

She was among a crop of veterans recruited and financed in part by Massachusetts Democratic Rep. Seth Moulton. McGrath also had the support of New York Sen. Kirsten Gillibrand, who has backed female candidates over establishment preferences in several races.