The GOP defied expectations as voters in a number of key races cast ballots to keep their Senators in place, with only one incumbent Republican — outspokenly in favor of gun control — tanking.

With Republicans holding a four-seat majority, they faced extreme pressure across several races but in the end will hold control of the chamber, though with a tighter margin.

The losing incumbent, Mark Kirk of Illinois, “F” rated by the National Rifle Association, was soundly beaten by Democrat U.S. Rep. Tammy Duckworth, an Iraq War veteran who lost both legs but left her wheelchair to participate in the House sit-in on gun control earlier this year.

To stop the bleeding by Senate Republicans, toss-up races went to Florida’s Marco Rubio, Missouri’s Roy Blunt, Wisconsin’s Ron Johnson, North Carolina’s Richard Burr and Ohio’s Rob Portman. The NRA and anti-gun PACs funded by former New York Mayor Michael Bloomberg both shoveled cash into these narrow contests but the candidates endorsed by the gun rights group came out on top.

The retirement of Indiana’s Republican Sen. Dan Coats led to a seesaw battle against former Democrat Gov. Evan Bayh and U.S. Rep. Todd Young. In the end, Young bested the NRA “F” rated Bayh.

Freshman GOP Sen. Pat Toomey of Pennsylvania, who lent his muscle in the Senate to a background expansion measure that bore his name, conversely for a Republican had the endorsement of gun control groups and advocates who spent more than $3 million in an attempt to keep him in place. Unexpectedly, he defeated Democrat contender Katie McGinty, a former advisor to Vice President Al Gore and President Bill Clinton who is in favor of “assault weapon” bans as part of her platform.

In New Hampshire, Gov. Maggie Hassan, who has vetoed several gun rights bills in her time as the Granite State’s chief executive, benefited from nearly $8.5 million in funding from gun control groups in an attempt to move Republican U.S. Sen. Kelly Ayotte out of office. Though Ayotte failed to get much more than moral support from gun rights organizations, she was able to narrowly pull away from Hassan by about 1,500 votes early Wednesday, setting the stage for an expected recount.

Another seat still undecided, that of retiring Republican U.S. Sen. David Vitter of Lousiana, will go to a runoff election between Republican state treasurer John Kennedy and Democrat Public Service Commission chair Foster Campbell. Kennedy beat Campbell on Tuesday by more than 150,000 votes but came in short of a majority in a field of some 24 candidates.

A rare bright spot for Democrats Tuesday came when former Nevada Attorney General Catherine Cortez Mastro picked up the seat left open by outgoing Senate Minority Leader Harry Reid, defeating veteran U.S. Rep. Joe Heck despite the Republican’s $2.5 million assistance from the NRA. Cortez Mastro will be the first Latina woman in the U.S. Senate.

Likewise, in the U.S. House, Republicans largely kept their real estate, only shedding a few token seats to the Dems. One long time GOP member losing his job is Florida’s John Mica, an Orlando area lawmaker facing a tough fight after redistricting to Democrat opponent Stephanie Murphy. Murphy has a strong platform in favor of universal background checks as well as No Fly/No Buy legislation and had the endorsement of a number of gun control groups.

With the smoke cleared, the 115th Congress will most likely remain Republican, though slightly less than the one it will replace in 2017. It will remain in power during the first two years of Donald Trump’s first term under Senate President Mike Pence.