WASHINGTON — The Democrats could let a golden opportunity slip through their fingers on Election Day.

This year’s battle for control of the Senate should favor the blue party. The Republicans hold just a five-seat edge, and most of the 34 seats up for election or re-election are in states that are either tossups in the presidential contest or lean to the left.

Yet with a little more than five weeks to go, Republicans are in control of two key Senate races — in swing states Florida and Ohio — and are holding their own in three more crucial contests in the battlegrounds of New Hampshire and Nevada and the blue state of Pennsylvania.

If the Republicans maintain their seats in Florida, Ohio, New Hampshire and Pennsylvania and flip the seat in Nevada left by retiring Senate Minority Leader Harry Reid, their odds of keeping their majority for the next two years rise substantially.

Bolstering their prospects is a $21 million infusion into these and other key Senate races to fund an ad blitz, according to The Washington Post. The investment is being made by the Senate Leadership fund, the super PAC overseen by Senate Majority Leader Mitch McConnell.

The GOP’s majority in the Senate stands at 54-46 (including two Independents that caucus blue), and the nonpartisan Rothenberg & Gonzales Political Report projects the Democrats could flip anywhere from three to six seats this year. That means the upper chamber is still in play, whereas the party’s majority in the House appears secure.

If Hillary Clinton defeats Donald Trump in the race for president, Democrats would only need to win four more seats because their party’s vice president would serve as the tie-breaker in a 50-50 Senate. Currently Clinton holds a modest lead over Trump following their first debate.

And, in the most competitive Senate races, Democrats could still enjoy a turnout advantage. In two contests — in the blue states of Illinois and Wisconsin — the Democratic candidates are now clear favorites. In the red state of Missouri and the purple state of North Carolina, Democratic nominees are running surprisingly strong against entrenched GOP incumbents.

And then of course, there’s the Trump factor. In August, it appeared Trump might sink the GOP majority in the Senate and possibly even the House.

These two factors have led to a more competitive Senate race, which has allowed the hard work of Republican Senate candidates to pay dividends. Whether that continues remains to be seen. This election season has been unpredictable and is likely to remain so right up until November 8.

Nevada

The open Nevada Senate seat, left vacant by Harry Reid’s retirement, represents the Republicans’ one legitimate pick-up opportunity. Heck is a strong candidate who has proven his mettle by winning tough races in his swing congressional district. He’s a physician by trade, an Iraq war veteran and brigadier general in the Army Reserve. Cortez Masto is Reid’s handpicked successor and as a Hispanic woman, has the demographic profile to succeed in a state where non-white voters are often influential. Right now the story of the race is Trump; he’s showing surprising strength in recent polls, and that is helping Heck keep Cortez Masto on the defensive.

Wisconsin

Feingold has the upper hand in a rematch of their race from six years ago, when he was the incumbent and Johnson was the challenger in what turned out to be a GOP wave election. Although Trump has shown some life in this state, it still leans toward Clinton, and that Democratic bent, typical of Wisconsin in presidential cycles, is making it difficult for Johnson.

Illinois

Kirk narrowly won the Senate seat previously held by President Obama in 2010, a GOP wave year. This election, Illinois, a reliable blue state, is expected to act more predictably and deliver for the Democrats. Kirk is a military veteran and a tough politician who suffered a stroke in 2012. Prior to running for Senate, he survived multiple challenges in a left-leaning congressional district. He won’t go down without a fight, but Duckworth, a double-amputee Iraq war combat veteran, is favored to win.

Ohio

This race is all over but the shouting. Strickland, a former congressman and governor, turned out to be a real dud of a candidate in this perennial battleground. National Democratic groups weeks ago withdrew their money from Ohio and earmarked it for other contests. Even before Trump surged here and threatened to win the state after two consecutive victories by Obama, Portman was in good shape.

Florida

Everything changed in this race when two things happened. First, Rubio reversed himself and decided to run for re-election after dropping out of the presidential race; second, Murphy turned out to be a flawed candidate. Rubio has been able to recover much of his popularity in Florida after his disastrous showing in his home state’s GOP presidential primary. At the same time, news reports uncovered that Murphy wasn’t honest about his professional background. Rubio regularly runs ahead of Trump in public opinion polls, suggesting that his lead is durable even if not perfectly safe in a swing state like Florida.

Pennsylvania

Like Ayotte, Toomey has tried to straddle the fence on Trump, and has not yet said if he plans to endorse or vote for the Republican party’s presidential nominee. Why is Toomey keeping his distance? The Philadelphia suburbs. That’s where the race is likely to be won and lost for him, and that region is among the reasons Clinton continues to lead Trump in Pennsylvania despite her inherent weakness in other parts of the state, particularly the parts of central and western Pennsylvania. Toomey regularly outperforms Trump in public opinion polls, and he’s running a strong campaign. But McGinty has turnout and Pennsylvania politics on her side. The state has not voted GOP for president since 1988.

New Hampshire

Ayotte leads Hassan in most polls despite the fact that Clinton is running 5 points ahead of Trump in the presidential horse race in this state. That’s a credit to the laser focus Ayotte has on New Hampshire issues and how disciplined she’s been in not allowing herself to get drawn into questions about the volatile presidential race. But the danger Trump poses to her is evident in the distance she has kept from him: The senator has said she will vote for him but has tried to walk the fence by saying that doing so doesn’t equal an endorsement. Additionally, in New Hampshire, down-ticket races often perform according to the presidential contest, so Hassan has to be heartened by Clinton’s advantage in that race. That, and the fact New Hampshire hasn’t voted Republican for president since 2000.

David M. Drucker is a senior correspondent for the Washington Examiner and host of “Examining Politics,” a weekly podcast.