After an election that put Republicans in control of more state legislatures than at any time in party history, legislative opportunities for groups that support stricter firearm regulations are limited. The exception is likely New Mexico, an arid state that may prove an oasis for the gun reform movement, offering it the best chance for a substantive win in 2017.

The state legislature returned to Democratic control in November. The governor is Susana Martinez, a Republican who in the aftermath of the Sandy Hook Elementary School mass shooting in 2012 signaled her support for the expansion of background checks. Now, a bill that would do that for virtually all firearms sales and transfers has already advanced through crucial committees in both chambers.

Privately, advocates for gun violence prevention concede that the chances of substantial reform efforts succeeding elsewhere are dismal. Under the current political alignment, much of their legislative focus will be on trying to block bills that unwind gun restrictions, including measures that would allow guns in airports, government buildings, into schools, and onto college campuses.

“For 2017 and 2018, the situation is really bleak at the state level,” said Gregg Carter, a social science professor at Bryant University and author of Gun Control in the United States. “The one major issue they have a real shot at winning on is universal background checks. They might be able to add one or two states to the list, since gun owners and non-gun owners are generally in favor of them.”

Nationally, there’s an even greater threat looming for gun reformers: a bill that would make a permit to carry a concealed handgun acquired in one state valid in all states.

Under federal law, background checks are required for all gun sales or transfers that occur at licensed dealers. But private transactions, which are sometimes arranged over the Internet, at gun shows, or in parking lots, are excluded. Advocates claim these loopholes make it easy for felons and other people prohibited from owning firearms to easily acquire them.

After the Sandy Hook massacre, gun control advocates — including those at Everytown for Gun Safety, which has provided funding for The Trace — made expanding background checks to include private sales a top priority. It was the first time well-funded opposition emerged to challenge the supremacy of the National Rifle Association at the state level.

Polls consistently show that nearly 90 percent of Americans support background checks for all gun transactions.

At the moment, eight states, plus Washington, D.C., require background checks for virtually all gun purchases, according to the Law Center to Prevent Gun Violence. Two more states, Maryland and Pennsylvania, also have similar requirements, but exclude long guns from the statute.

Another eight states have so-called permit to purchase systems, which require residents to obtain a permit before they purchase a firearm — but do not require new background checks for private sales thereafter. The arrangement can have its drawbacks: North Carolina is a permit-to-purchase state, and a 2013 investigation by the Charlotte Observer revealed that in one county there, 60 permit-holders were also convicted felons.

So far this year, lawmakers in six states have introduced bills that would expand the background check system. But New Mexico is the only state where the legislation seems to have a real chance of becoming law.

Among the other states where bills have been introduced, Republicans control both the governorship and the legislature in Arizona, Missouri, Iowa, and South Carolina. In Vermont, Democrats control both legislative chambers, but its historically liberal bent notwithstanding, the state has long maintained some of the loosest gun laws in the country.

The NRA opposes universal background checks, and can wield tremendous influence on state lawmakers. As The Trace has reported, the gun group uses its grading system to pressure lawmakers — mostly Republicans — to vote how it wants.

Republicans now control 67 of the 98 state legislatures across the country. Nationwide, more than 3,970 state lawmakers, nearly 90 percent of whom belong to the GOP, now claim a grade of A- or better from the NRA.

Emboldened GOP lawmakers are eager to roll back gun restrictions. Nearly a dozen states, for example, are debating whether public colleges and universities should be required to allow firearms on their campuses. Another 19 states are contemplating allowing citizens to carry concealed handguns without first obtaining a permit or training, a formerly fringe notion that is becoming increasingly mainstream.

In a sign of how the struggle between advocates of tougher gun laws and the NRA is going, two more states allow permitless carry — meaning gun owners do not need official allowance to bring a firearm into public — than have enacted universal background checks.

There is good reason for supporters of stricter gun laws to feel optimistic about New Mexico, however. The state is solidly Democratic, and part of a region that is growing more progressive, especially when it comes to the politics of guns. Between 2013 and 2015, three of the six states that implemented universal background checks were in the West, including Oregon, Washington, and Colorado. Last year, Nevada voters approved universal background checks through a ballot initiative — though the state’s Republican attorney general argues that the statute would be unenforceable, and the law has not yet been enacted.

Demographics and geography are only part of the reason that New Mexico’s legislation is well-positioned to become law. Everytown spent more than $250,000 on New Mexico state elections last year in an effort to elect pro-gun reform candidates, more than any other lobbying or special interest group.

The state’s lower chamber, then in the hands of Republicans, was seen as ripe for flipping. In 2014, the GOP wrested it from Democratic control for the first time since the Eisenhower administration. In 2015, House Republicans sidelined a popular bill that would have required anyone purchasing a firearm at a gun show to undergo a background check — a bill that Governor Martinez seemed likely to sign, based on her previous comments.

Everytown also deployed a network of volunteers through one of its affiliates, Moms Demand Action for Gun Sense in America, to make thousands of calls in support of its preferred candidates.

“We were especially calling for candidates who supported the background check law,” said Cheryl Haase, one of the Moms Demand Action volunteers in New Mexico.

By contrast, the NRA spent just $10,000.

Democrats took full control of New Mexico’s legislature in November.

“These victories mean there is now a background check majority headed to the statehouse,” Everytown said in a statement after the election.

The group had already recruited a lawmaker to sponsor the legislation it had in mind. Last summer, State Senator Richard Martinez was recovering from a broken foot when he received a call from Pedro Morillas and Julianna Koob, two lobbyists working for Everytown, he said. They wanted to know if they could come by his home in Espanola, a sparsely populated city in the northern part of the state, where hunting is popular. Martinez, a Democrat then in his fourth term, had an interest in strengthening gun laws and agreed to meet, he said.

When Morillas and Koob arrived at the senator’s home, they sat down in his dining room, where he was presented with the background check bill, and asked if he would sponsor it.

After looking over the materials, Martinez agreed.

“The bill closes very dangerous loopholes,” he said. “It doesn’t take anyone’s gun rights away.”

The legislation is advancing through both chambers of the legislature. The House bill is heading to the floor while the Senate version is on its way to the Judiciary Committee, which Martinez chairs. Meanwhile, volunteers for Moms Demand Action have been a regular presence at the state capitol. Dozens have showed up to testify at hearings and buttonhole lawmakers. Last week, the group held a “lobbying day,” in which roughly 80 volunteers passed out postcards to their respective representatives.

Governor Martinez has not said publicly whether she will sign the legislation should it arrive on her desk, and did not respond to a request for comment.

The New Mexico Sheriff’s Association, which represents the state’s 33 sheriffs, has come out against it. The association did not respond to repeated requests for comment. In a statement issued earlier this month, the group argued that the legislation would “make it harder for law-abiding New Mexicans to exercise their Second Amendment rights, waste scarce law enforcement resources, and do nothing to keep guns out of the hands of criminals.”

The New Mexico Shooting Sports Association, the NRA’s state affiliate, says the legislation would inconvenience gun owners who would be required to travel considerable distances in the rural state to get to a gun shop, where a background check can be conducted.

“That’s a big challenge for rural gun owners who don’t live within a 100 miles of a licensed dealer,” said Mark Abramson, an executive officer in the group. “How will they effect a transfer?”

Everytown says that for most New Mexicans, distance is not an issue. According to its calculations, 89.2 percent of state residents live within 10 miles of a licensed dealer.

The NRA is now ramping up efforts to oppose the bill. The legislation, it says on its website, would “prohibit you from selling firearms from your personal collection to any distant relatives, long-time friends, business partners, neighbors, or fellow gun club members without government permission.” On February 10, the group reported an expenditure in the state for over $44,000, paid to a consultant for “Internet communications,” which likely refers to ads that will attack the bill.

“The policy is so common sense that almost everyone agrees on it,” Rosen, from Everytown, said. “There’s only a battle because the other side needs to smack anything down that goes against its interests.”