IT WAS a “big win” tweeted Donald Trump on April 25th, as he congratulated the Republican winner of a special congressional election in Arizona’s eighth district. And yet, he complained: “Press is so silent”. Neither of these claims was true. The media has been poring over the outcome of a race, in a staunchly conservative district on the edge of Phoenix, that would normally deliver a boringly predictable Republican win. That is because the Republican victory there was much narrower than usual.

In the election to find a successor to Trent Franks, who resigned in December following allegations he had asked a female staffer to be the surrogate mother of his child, the victor, a former state senator called Debbie Lesko, beat her Democratic opponent, Hiral Tipirneni, a political newcomer, by only five percentage points: by 52.6% to 47.4%. This was in a district that voted for Mr Trump in 2016 by a 21-point margin.

The Republican Party, fearing an embarrassing upset in a district which the Democrats did not bother to contest in Mr Franks's last two races, had worked unprecedentedly hard for Ms Lesko's win. Outside Democratic outfits pretty well ignored the race, while Republican groups splurged over a million dollars on it. Paul Ryan, the speaker of the House of Representatives, and other Republican leaders hosted fundraisers for Ms Lesko. Mr Trump recorded robocalls for her—vote Republican, he thundered, or “illegal immigrants will pour right over your border”. And Ms Lesko, an affable and locally-popular mother of three, was a pretty strong candidate for the eighth.

Her poor showing, despite all of that, is yet another indicator of the headwinds Republicans face as they gear up for the midterms in November. American voters have a history of cutting the president’s party down to size in midterms, especially when it controls all the levers of power, and even more so when the president is unpopular. The Republicans control every elected branch; and, a little over a year into his tenure, Mr Trump is the most unpopular president since polling records began. That is why the result on April 24th was so close. According to Fivethirtyeight, a data journalism website, her victory represented a 20-point swing towards Democrats relative to the district’s partisan lean (a measure based on how it voted for president in 2016 and 2012 relative to the country). That was at least better than her party colleague Rick Saccone managed in Pennsylvania’s 18th district last month; the Democratic candidate, Conor Lamb, won it on the back of a 22-point swing.

Thanks partly to rampant gerrymandering and a dwindling number of generally competitive seats, the midterms might not deliver their usual anti-incumbent thumping this year. And politics is never predictable, of course. Nonetheless, most of the evidence suggests that a big blue wave is surging towards the Republican beach. The Cook Report reckons that about 147 Republican districts are more competitive than Arizona’s eighth. “If the only data point you had to go on was last night’s #AZ08 result, you’d think a 30-40 seat Dem House gain in Nov. would be way low,” tweeted David Wasserman of the Cook Political Report on April 25th. Democrats need 23 seats to take the House.