This article is from the archive of our partner National Journal

Just weeks before the November midterms, Jim Costa was feeling good. The five-term California House Democrat was about to face off with Republican candidate Johnny Tacherra, but he felt confident enough in his chances that he was willingly giving away thousands of dollars from his campaign fund to fellow Democrats who—it was thought—needed the money to win more-competitive races.

Costa's confidence was misplaced. He got a nasty surprise on election night; when the polls closed, his race was too close to call. It stayed that way for two weeks, and Costa had to wait until Nov. 19 to be declared victor—besting Tacherra by only 1,319 votes.

Costa's preelection spending decisions are hardly in keeping with a candidate expecting such a razor-thin contest: From Oct. 23 to Oct. 30, Costa doled out about $51,000 to other campaigns—his team even listed a $500 donation on Election Day to the Lake Yosemite Sailing Association, according to his report. And he likely had much, much more money available that he neither gave away nor spent himself. He had more than $641,000 cash on hand when the filing period ended on Nov. 24. (Costa's campaign did not respond to requests for comment.)

But if Costa was caught off-guard by his near-miss, he had plenty of company. Newly filed FEC reports reveal that in the run-up to the elections, a host of Democrats from liberal districts were making confident choices with their campaign coffers, oblivious to the near-defeats they were about to face.

Along with Costa, Democratic Reps. Jerry McNerney and John Garamendi of California also narrowly escaped defeat, as did Democratic Rep. Louise Slaughter of New York. But none of them scraped the bottom of their respective war chests in the run-up to the election.

McNerney finished the cycle with nearly $214,000 left in cash, and he reported giving nearly $30,000 in contributions to other committees in the race's final weeks. Garamendi reported nearly $200,000 cash on hand at the end of the period, and Slaughter had more than $351,000 left.

The unspent money underscores Democrats' surprise at the magnitude of Republicans' midterm success, especially in states and districts that were seen as solidly blue territory. "I don't think they saw it coming at all," said Allan Hoffenblum, publisher of the California Target Book. "I bet they won't do that again."

Costa may have been lulled into a false sense of security by the fact that his opponent, Tacherra, was an underfunded dairy farmer, Hoffenblum said. But in such a tough year for Democrats, it's just as dangerous to face a Republican who's flown under the radar, he added.

None of these candidates were widely considered major targets for Republicans, but Democratic Congressional Campaign Committee press secretary Josh Schwerin said in a statement that the committee was prepared for close races. "Democrats prepared for a tough cycle and won a majority of the close races and held many seats that were lost in 2010," Schwerin said. "That's because of the hard work our most vulnerable members did to prepare, and the tremendous support they got from their colleagues."

Part of the California Democrats' apparent misreading of their races may stem from the schizophrenic nature of their districts.

Costa and McNerney both had narrow victories in 2010 amid low turnout, won easily in 2012, and then struggled again this cycle as the number of votes dropped more than 40 percent in their races from 2012 to 2014. The turnout pendulum poses a frightening possibility for Democrats: If it keeps swinging, they can feel good about their 2016 presidential chances, though less confident about their hopes for winning seats in elections where the White House isn't on the line. But if the 2016 electorate looks like the one that turned out in November, Democrats could find themselves locked out of power altogether.

SELF-FUNDERS

The fundraising reports also offer some insights into some of the top self-funding House candidates' campaigns, which had wildly varying degrees of success.

Democrat Sean Eldridge, for example, spent nearly $5.7 million throughout the cycle, including nearly $4.3 million from his own personal funds. But the investor and husband of Facebook cofounder and New Republic publisher Chris Hughes lost in a highly publicized blowout to Rep. Chris Gibson, by 30 percentage points. All in all, Eldridge spent $84.51 per vote in the loss. (Gibson, who spent slightly more than $3 million and didn't rely on any of his own money, spent $24.61 per vote.)

Republican Rep.-elect Tom MacArthur of New Jersey, another self-funder, had drastically different results. He loaned his campaign $5 million of his own money throughout the race and seemed to put little effort into raising additional money, taking in just $340,000 in individual donations throughout the campaign. In total, he spent $5.3 million. And in the expensive Philadelphia media market, his wide financial advantage clearly had an effect: House Majority PAC shifted its resources away from the race in late October, and MacArthur went on to win by 11 percentage points.

Republican Rep.-elect Dave Trott of Michigan had a similar experience, spending nearly $4.8 million throughout the race, including about $3.6 million of his own money. He unseated Rep. Kerry Bentivolio in the Republican primary and won the general election by 15 percentage points.

The post-general FEC reports also show that Rep.-elect Rick Allen of Georgia, the Republican who defeated Rep. John Barrow, put more than $440,000 of his own money into his campaign funds at the end of November.

MAJOR DONATIONS

The reports also show some late major donations to super PACs.

Some of the major donations in the final weeks of the cycle included: $3 million from Charles Koch to Freedom Partners Action Fund, making his total contribution to the group $5 million for the cycle; a combined $2.25 million from Joe and Marlene Ricketts to Ending Spending Action Fund, making their total nearly $7.4 million for the cycle; $1.8 million from former New York City Mayor Michael Bloomberg to House Majority PAC, making his total $2.2 million; and $1 million to House Majority PAC and $3 million to Senate Majority PAC from James Simons, making his total donations to the groups $2 million and $5 million, respectively.

Hedge fund investor Tom Steyer did not contribute to NextGen Climate Action in the last three weeks of the cycle, but he gave a total of $67 million and only raised an additional $11 million from others, as Politico first reported. That's a far cry from the even split he planned for when he hoped to give $50 million and raise $50 million.

This article is from the archive of our partner National Journal.

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