When Trent Franks resigned after allegations of sexual harassment and bizarre recruitment for surrogate pregnancy, his seat in Arizona’s 8th congressional district seemed pretty safe. It has a Cook index of R+13 and hasn’t elected a Democrat since 2012, when Ron Barber won a special election following the shooting of Gabrielle Giffords and her withdrawal for medical reasons. Even in a tough political environment, Republicans expected to hold onto the seat.

And hold it they did, although it wasn’t as easy as it should have been:

Republican Debbie Lesko won an Arizona congressional special election Tuesday over her Democratic rival, Hiral Tipirneni, NBC News projected.

Tipirneni declined to concede the race, saying outstanding votes made it too close to call.

Lesko held a 52.6 percent to 47.4 percent lead over Tiperneni at 10 p.m. (1 a.m. ET) Tuesday, according to the Arizona secretary of state’s office, a margin that may concern some Republicans.

A five point margin isn’t exactly a squeaker, but Democrats came a lot closer here than they have at any time since Barber:

President Donald Trump carried the district in the conservative Western Phoenix suburbs by 21 percentage points, and its previous occupant, Trent Franks, a Republican, ran unopposed.

Franks didn’t run completely unopposed in the last two elections. Both times, he had minor-party candidates on the ballot, winning handily 69/31 in 2016 against a Green Party challenger and 76/24 in 2014 against a nominee from the “Americans Elect” party. They weren’t completely walkovers either, but in 2012 Franks did score a 63/35 win over the Democratic nominee in a presidential cycle that saw Barack Obama win a second term.

In the 2012 election, the seat was open (Barber declined to run again), meaning Franks won that as a non-incumbent. The eleven-point difference between GOP results in that election and Lesko’s win will no doubt heighten concerns about the midterms, especially since Democrats didn’t go all-in to win this seat:

National Democrats, however, stayed away from the race, deducing that a district that has sent only Republicans to Congress for four decades [see below] was out of reach. And any hopes Ms. Tipirneni had to win outside support may have faded this month when a local TV station reported that she had not practiced medicine since 2007 and had settled a malpractice lawsuit with a woman who blamed her for contracting tetanus.

In contrast, the Republican National Committee, the National Republican Congressional Committee and the Congressional Leadership Fund, the primary House Republican super PAC, each poured hundreds of thousands of dollars into the race. The investment proved critical in what became an unexpectedly close race.

“It’s a warning shot,” Senator Jeff Flake, Republican of Arizona, said of the results. “Anything below a 10-point margin is not good news.”

One note: this district was created after the 2000 census, so it hasn’t been sending “only Republicans to Congress for four decades.” As noted, Democrat Gabrielle Giffords held this same seat for most of three terms until her wounding in a mass shooting in 2012. The district got almost completely redrawn after the 2010 census to include more Republican precincts, many of which did have long track records of Republican support, so the Democratic decision to hoard its resources made some sense. But this district isn’t even quite two decades old, let alone four.

Special election results get too much consideration as predictive models for normal elections, generally speaking. For one, their existence separate from other races allows parties to dump lots of resources into them that won’t be available when 434 other elections are occurring simultaneously as in regular elections. In this case, though, the heavy tilt toward the GOP in resources added to the lack of response from voters should have Republicans worried about what’s coming in November.

Unless the economy really heats up and/or the Robert Mueller probe concludes with no action between then and now, the GOP’s hopes for holding the House look pretty bleak. And with this tepid support in one of their strongholds, their chances of holding Flake’s seat look a little dicey, too.