The Republican candidate Troy BaldersonJohn Minchillo / AP

Republicans look poised to eke out a victory in the last major congressional bellwether before the November midterm elections. But a razor-thin margin in a suburban Ohio district the GOP has held comfortably for decades confirms that the party’s grip on control of Congress is shaky.

Troy Balderson, a Republican state legislator who secured a late push from Donald Trump, appeared to hold off the Democrat Danny O’Connor on Tuesday in a special House election in and around Ohio’s capital city of Columbus. With all precincts reporting, Balderson led 50.2 percent to 49.3 percent, although the race remained too close for the major networks and the Associated Press to call. Rather than explicitly concede, O’Connor rallied his supporters for a November rematch both candidates knew was coming regardless of the night’s result.

“We’re not stopping now,” he said late Tuesday. “Tomorrow we rest, and then we keep fighting through to November.”

The race was the last in a series of closely watched special elections in House districts that Republicans have dominated for years. The GOP has won all but one of them—a narrow loss in Pennsylvania in March—but over-performance by Democrats in nearly every instance has buoyed the party’s hopes that it can win in dozens of districts across the country that are more favorable to the party.

“We’re in a jump ball here,” Tom Perez, the chairman of the Democratic National Committee, said on MSNBC late Tuesday night.

Like the March special election in a Trump-friendly district in Pennsylvania and last year’s closely fought House race in Georgia, both parties spent millions to win a seat that will, for the moment, have little impact on the balance in power in Washington, D.C. Balderson’s win earns him a congressional tenure of just five months; he will have to defend his seat against O’Connor again in three months.

But election forecasters said this race likely provided the cleanest test yet of whether the Democratic enthusiasm edge in 2018 could carry the party into the House majority this fall. Trump won the district, which spans from Columbus into rural Ohio, by 11 points in 2016. Its previous representative, Pat Tiberi, was a reliable Republican vote who served nine terms and never won by less than nine percentage points—the margin of his first victory in 2000. Voters there have not sent a Democrat to Congress since 1980. And the electorate features plenty of the college-educated, suburban voters likely to be disenchanted with Trump, who Democrats are counting on to support them across the country.

If Democrats could win a GOP district like Ohio’s 12th, in other words, they could easily pick up the 22 other seats they’ll need to win the House. And even if they fell just short, as O’Connor did on Tuesday, a tight margin would portend a difficult path in the fall for Republicans. A memo that the Democratic Congressional Campaign Committee sent to reporters before polls closed noted that there were 79 GOP-held seats across the country that the party considered more winnable targets in November.

For all those reasons, Republicans went all out in the closing days to push Balderson over the line. Trump flew in for a rally in which he attacked “Danny Boy” O’Connor as a tool of House Democratic Leader Nancy Pelosi and sought to gin up his base to turn out for Balderson. Despite being no fan of Trump’s, Ohio’s Republican governor, John Kasich, cut an ad backing Balderson, and GOP-backed groups outspent Democrats by a significant margin in the final weeks of the campaign.

Conservatives took the win on Tuesday night, but the nail-biter left them with little to celebrate. “While we won tonight, this remains a very tough political environment,” said Corry Bliss, the executive director of the Congressional Leadership Fund, the main House GOP super PAC, in a statement. “And moving forward, we cannot expect to win tough races when our candidate is being out-raised.”

Trump made a similarly late entry into Pennsylvania’s closely fought House special election in March, when the Democrat Conor Lamb defeated the Republican Rick Saccone by fewer than 1,000 votes in a district the president won even more handily in 2016. This time around, it wasn’t clear whether Trump’s intervention had succeeded in waking up Republican voters, firing up progressives, or both. A day before landing in Ohio, the president insulted the intelligence of the state’s hometown star LeBron James in a tweet that could have undercut his push for Balderson.

True to form, Trump claimed full credit for delivering Balderson to Congress in a late-night tweet, citing O’Connor’s lead in early voting tallies before his rally.

As in Pennsylvania, Republicans were running a veteran state legislator against a much younger, more telegenic opponent. Just as they did against the 34-year-old Lamb, Republicans tried to paint the 31-year-old O’Connor as a liberal stand-in for Pelosi, their favorite Democratic piñata for the past decade. And like Lamb, O’Connor jettisoned the 78-year-old former (and perhaps future) speaker early on. He called for “a new generation of leadership” in both parties. When O’Connor briefly stumbled by suggesting he’d vote for whomever Democrats pick as their leader, Republicans pounced.

Five months ago, Trump and the GOP cavalry were not enough to defeat Lamb. In Ohio on Tuesday night, it appears the party’s rescue operation succeeded: It was Balderson who was leading by around 1,700 votes, with provisional ballots still to be counted. But the apparent result should not soothe the GOP’s anxiety about November. If Ohio’s 12th Congressional District is as close a reflection of the nation’s most competitive House seats as both parties seem to believe, the Republican majority remains very much at risk.

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