OMAHA, Nebraska — Just 18 months after declaring his opposition to banning assault weapons, Nebraska Democrat Brad Ashford has changed his mind.

The former one-term congressman, now trying to win back an Omaha-area seat he lost in 2016, used to consider it futile to push for a ban while Republicans held power on Capitol Hill. But the student activism that has followed the rampage at a school in Parkland, Florida, has changed his thinking in a way that other high-profile shootings, including two in his hometown since 2007, had not.

Ashford’s conversion mirrors the one underway in his party. Not long ago, a moderate record on guns would have been considered a plus for a Democratic candidate in the GOP-leaning suburbs and conservative outskirts of Nebraska’s largest city. Today, even with Ashford’s reversal, it’s a vulnerability that his opponent in the May 15 Democratic primary has been quick to exploit.

That contest, along with races in Virginia, rural Pennsylvania and other places where gun control has been taboo, shows how far the Democratic Party has traveled on this issue. The November elections will test whether Democrats will make room for candidates who don’t back all gun control measures.

READ NEXT: Democratic state prosecutors unite against concealed-carry gun law

“He should have been stronger on this,” said Kara Eastman, the 46-year-old political newcomer running against Ashford for the nomination in the 2nd Congressional District. “We need leaders who are going to stand up and fight for the kids.”

Eastman, director of a children’s nonprofit group and a community college board member, has focused her message on suburban women and young people. She and other progressives, energized by rallies across the country, say they the best way to turn out voters is to offer a contrast to pro-gun Republicans.

“Women have had it with what’s going on,” said Crystal Rhoades, the Douglas County Democratic Party chairwoman who supports Eastman. “They’re mad that they have to worry about sending their kids to school out of fear they’ll be murdered.”

Polling shows there’s little disagreement among Democrats on the question of stricter gun laws.

A poll last month by The Associated Press-NORC Center for Public Affairs Research found that 69 percent of those surveyed, including 90 percent of Democrats, think gun laws in the U.S. should be tightened.

There are political risks.

READ NEXT: Which gun control proposals actually have a chance of becoming law?

The Omaha district represented by Republican Don Bacon has a healthy number of gun owners, and that could make Eastman’s call for comprehensive gun control a problem for her if she advances to the general election. The GOP-leaning district includes a portion of a rural county south of the city where many active duty and retired military personnel from Offutt Air Force Base live.

“I don’t think their mindset has changed. If you’re pro-gun, you’re still pro-gun,” said Charlene Ligon, the Democratic chairwoman in rural Sarpy County. “And there are a lot of people with guns around here.”

In a northern Virginia swing district, all six Democrats who hope to challenge the Republican incumbent, Barbara Comstock, want to ban assault rifles and expand background checks for gun buyers. In 2016, Comstock’s Democratic opponent endorsed only modest changes.

Last month, Democrat Conor Lamb won a special congressional election in southwestern Pennsylvania in which he advocated expanded background checks, a once disqualifying position in a district that Donald Trump won by 20 percentage points in 2016.

Lamb stopped short of embracing an assault weapons ban, though Sen. Bob Casey, D-Pa., has joined the call. And longtime gun advocate Joe Manchin, a Democratic senator from West Virginia, led an unsuccessful effort to expand background checks in 2015.

“It certainly seems to be a realignment of what was viewed as politically expedient,” said Andrew Patrick of the Coalition to Stop Gun Violence. “This is no longer a liability for Democrats.”

While Nebraska’s Ashford advocated some gun control measures during two terms in the state Legislature, he said during a 2016 debate with Bacon, “I don’t think we should ban assault weapons.”

In Washington, Ashford did not join lawmakers from both parties in backing legislation to expand background checks, saying any gun measures would have proved futile in the GOP-controlled House. Nor did he go along with about 150 Democratic co-sponsors on a measure to ban assault rifles after the shooting in San Bernardino, California, in 2015.

“I had no belief that putting a lot of effort in an assault weapons ban would get us anywhere,” Ashford said in an Associated Press interview. “I had sort of lost faith in our ability to ever get there.”

The students in Florida and elsewhere who mobilized after the Parkland shooting have changed Ashford’s mind.

“The Parkland thing, now I just feel reinvigorated, and I would vote for an assault weapons ban, today,” he said.

Eastman, his primary opponent, is keeping the pressure on.

She accuses Ashford of being on both sides of the issue at a time when voters, especially young people and parents, demand action. And she’s ready to delivery, saying she supports an assault weapons ban, universal background checks and an automatic waiting period between purchase and delivery.

“I’m talking to voters, they are frustrated with that and are looking for someone who stands by their convictions,” she said.