Anita Snow / AP

Democrats failed to flip Arizona’s 8th congressional district from red to blue in Tuesday’s special election, but their candidate did well enough to reinforce their narrative that the “blue wave” could help them take the House in November.

“There are no moral victories in this business,” said Andy Barr, a local Democratic strategist, “but I’m pretty damn happy.”

State Senator Debbie Lesko defeated Democrat Hiral Tipirneni, a cancer-research advocate and former ER doctor, with 52.6 percent of the vote to Tipirneni’s 47.4 percent, a margin of 5.2 percent in a district that went for Trump in 2016 by 21 percent. The two were vying to replace Republican Representative Trent Franks, who resigned in December amid reports that he asked a staffer to be a surrogate mother to his child. A Democrat hasn’t been on the ballot in the district, which encompasses several Phoenix suburbs, since 2012. But after winning recent special elections in Alabama and Pennsylvania, Democrats felt emboldened to try to close the gap. And Republican groups were concerned enough to invest more than $1 million in the race.

In the end, it was enough to keep the district, but not enough to calm the fears of Republicans going into the midterms. “You’d have to be in full denial to not see this for what it is,” according to Republican pollster Mike Noble of OH Predictive Insights. “I’m like Chicken Little over here … [The GOP] shouldn’t be hitting the panic alarm, they should be slamming it repeatedly.”

As I reported on Tuesday, Tipirneni was never likely to win the race. Registered Republicans vastly outnumber Democrats in the area. Plus, nearly two-thirds of the voting electorate are on the state’s “permanent absentee list” and had already voted before polls even opened on Tuesday morning. That matters, according to The New York Times’ Nate Cohn, because “a permanent absentee list cuts against big partisan turnout edge.” Democrats, in other words, weren’t going to benefit from the same low Republican turnout they had in other special elections.

But the fact that Tipirneni earned nearly 47 percent of the vote in such a deeply red district reinforces the narrative that Democrats will do well in November. And with that narrative still intact, Democrats can now turn their attention to a much more consequential mission: replace retiring Republican Arizona Senator Jeff Flake with one of their own.

“If you’re [Democratic Senate candidate] Kyrsten Sinema right now, you know your race is for real,” Barr said.  “Martha McSally probably thinks she’s screwed.”

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.