When the dust settles next month, it’s possible that Republicans will have successfully fended off Democratic challenges in each of the competitive special election races to replace President Donald Trump’s cabinet appointees.

But it’s going to come with a hefty price tag for national Republican groups.

The National Republican Congressional Committee, the Republican National Committee and the Paul Ryan-affiliated super PAC Congressional Leadership Fund have already spent more than $15.5 million combined on a trio of unexpectedly competitive races in deep red congressional districts, according to independent expenditure and disbursement reports filed with the Federal Election Commission.

That includes almost $10 million spent in advance of the June 20 runoff election in Georgia’s Sixth Congressional District, where Republican Karen Handel and Democrat Jon Ossoff are locked in a neck-and-neck contest in the race to replace Health and Human Services Secretary Tom Price. The high-stakes contest is already on track to be the most expensive House election in American history.

The three GOP entities have also spent more than $5.4 million combined to back Montana Republican Greg Gianforte, who hopes to fend off insurgent Democrat Rob Quist in Thursday’s special election to replace Interior Secretary Ryan Zinke, as well as about $205,000 to support Kansas Republican Ron Estes in his successful bid to replace CIA Director Mike Pompeo.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The true totals spent to date are even higher than those figures because some of the planned expenditures have not yet been filed with the FEC. The Congressional Leadership Fund, for example, tells NBC News that it has spent about $6.5 million on the Georgia contest to date, even more than the $5.9 million already visible in public records as of Monday afternoon. The RNC is also providing digital and on-the-ground support not yet captured by campaign filings — including paying for 14 staffers in Georgia and two in Montana.

The level of spending is particularly striking because in each of the three congressional districts, the previous Republican representatives won by double digits. Two of the three congressional districts — in Kansas and Montana — were won by Donald Trump by more than 20 points last year.

Still, national Republican groups have had to compete with an extraordinarily energized progressive base that has poured millions into Democratic candidates’ campaign coffers in the hopes that a dramatic upset would hint at massive GOP losses in next year’s midterm elections. Aided in part by a fundraising campaign by liberal website DailyKos, Georgia’s Jon Ossoff had raised a record $8.3 million as of early April, while Montana’s Quist announced last week that his campaign had hauled in over $5 million in donations.

While the Democratic campaigns have been primarily funded by those grassroots donations, national Democratic groups have spent only a fraction of what their Republican counterparts have pumped into competitive races so far.

The Democratic Congressional Campaign Committee, the DNC and the House Majority PAC have spent about $4.2 million combined on the three special elections in Georgia, Kansas and Montana, according to FEC reports and statements from the organizations.

The lion’s share of that spending is in Georgia, where the DCCC has spent about $2.9 million and the House Majority PAC has pledged an additional $700,000. And more spending is expected before Georgia’s election in four weeks — the party’s best chance for a decisive win.

Like the RNC, the Democratic National Committee is also supporting its candidates with resources not yet captured by FEC filings, including digital efforts and a recent deployment of 10 new field organizers in Georgia.

So far, Republican spending has prevented an embarrassing loss for the party. In Georgia, Ossoff failed to break the 50 percent threshold in an April 18 primary, forcing the runoff election slated for next month. In Kansas, Republican Ron Estes ultimately won in Kansas, although the margin was much closer than anticipated. And the GOP remains cautiously optimistic that its candidate will prevail in Montana this Thursday, too, though both parties are expecting the race to be decided by single digits.

“It’s better to be safe than sorry and spend the money right now,” notes a GOP operative following the races. “It’s just a very unpredictable environment.”