Gun control groups outspent the National Rifle Association in the midterm elections, pouring more than $11m into congressional races as NRA spending dropped dramatically.

Everytown for Gun Safety and Giffords, a gun control group founded by a congresswoman injured in a mass shooting, together spent more than $11m to influence national races, according to data compiled by the Center for Responsive Politics.

The two groups spent millions to boost Lucy McBath in Georgia and Jason Crow in Colorado, gun control advocates who beat Republicans with A ratings from the NRA. McBath, who has been a national spokeswoman for Everytown, lost her 17-year-old son Jordan Davis in 2012 when a white man shot and killed the unarmed teenager after an argument about loud music.

The NRA spent just under $10m on federal elections, focusing the most money on Republican Senate races, as Democrats took control of the House and pledged to push forward with gun control legislation.

The NRA’s spending represents a dramatic reduction from 2016, when it spent more than $55m to influence federal elections, including more than $31m to help put Donald Trump in the White House. In the 2014 midterms, the NRA spent more than $25m to influence congressional races – more than double its investment this year, according to data compiled by the Trace, a not-for-profit news outlet that covers gun violence and gun politics in America, and which has been funded by Everytown.

In five of the six House races in which gun control groups invested most heavily, their preferred candidate won, according to an analysis by the Trace.

The NRA did not respond to a request for comment on why its political spending had shrunk, or why it had not made more effort to protect House Republicans. But on Twitter after the election results came in, the NRA mocked Democrats for securing control of the House, writing “We get judges, they get Pelosi” – referring to the likely Democratic House majority leader – and “We’ll take the judges.”

Before the midterms, the NRA had already achieved its top political priority in the Trump administration: a gun rights majority on the supreme court. The NRA said earlier in the fall it was spending seven figures on an ad campaign to boost Brett Kavanaugh, who one expert said had the clearest pro-gun rights record of any supreme court nominee.

Trump’s previous addition to the court, Neil Gorsuch was also celebrated as a victory by the NRA, which can now rely on a majority of justices who are likely to protect, or even expand, the past decade of pro-gun rulings.

In some 2018 races, the gun rights group offered scant support to some candidates that had received its A ratings, among them Barbara Comstock, a Republican who lost her Virginia race. The NRA only spent about $12,000 to support her and attack her Democratic opponent, according to the Trace. Mike Coffman, an A-rated Colorado congressman, also lost, after gun control groups spent millions to defeat him. The NRA offered up only about $10,000.

Rick Scott, Florida’s Republican governor, was a longtime NRA champion. But he signed a package of modest gun control restrictions after a school shooting in Parkland left 17 people dead, and the NRA downgraded his A+ rating to a C. Scott is now facing a recount in an extremely tight Senate race against Bill Nelson, a Democrat who supports gun control.

The NRA’s investments in Senate races paid off in key races, as Republicans maintained a majority that has pledged to serve as a continuing roadblock to federal gun control legislation.

Three Republican candidates, in Missouri, Indiana and Tennessee, won races in which the NRA invested more than $1m to back them or defeat their opponent, according to an analysis by the Trace. The gun rights group also invested six-figure sums but lost in Montana and West Virginia. An Arizona race is still too close to call.

So far, NRA-backed candidates have won 106 races and lost 38, according to the NRA MoneyBot, a project of The Trace.