WASHINGTON — When he last asked Pennsylvanians for another term in the Senate, Bob Casey opposed tougher gun laws, even in the face of a mass shooting.

Yet in the aftermath of the Las Vegas massacre this week, Casey was one of the first Democrats to demand new restrictions, and on Tuesday he stood alongside the Brady Campaign to Prevent Gun Violence and some of the Senate's most vocal gun-control advocates at a news conference.

Pennsylvania voters will get their chance to judge the shift next year, when Casey will be on the ballot for the first time as a champion of tighter regulations on guns — one aspect of a very different political profile than he has presented in the past.

Along with moving on guns, the senator long known as a mild-mannered moderate from working-class Scranton has also shifted left on another touchstone cultural issue, backing same-sex marriage and mirroring his party's embrace of both stances as bedrock party principles.

Casey, who will seek his third Senate term next year, has said ever since the Sandy Hook school shooting in 2012 that his change of heart on guns was driven by his conscience and that he is trying to fight the carnage that occurs so often.

"I don't think you should ever be concerned when you believe you're doing the right thing," Casey said Tuesday — though Republicans have pounced on his move.

Back in 2002, when he ran for governor against Ed Rendell, Casey blasted the former Philadelphia mayor over the city's gun laws, and he won his last Senate race in 2012 as a Second Amendment-backing Democrat.

The Aurora, Colo., movie theater shooting happened just months before the election, in July, but at the time Casey said, "I don't think new legislation is going to positively impact the situation."

That sharply changed weeks after Election Day, when the elementary school shooting in Newtown, Conn., rocked the country, and reignited Democrats' push for new gun laws.

Days after the massacre, Casey told the Inquirer about the heartfelt conversations he had with his family, and about thinking of his own daughters as he watched reports about the assault that killed elementary school pupils. Casey announced his conversion on the issue, backing new gun laws, including universal background checks and bans on so-called assault weapons.

After every major shooting, Casey has reiterated his calls for such laws, and introduced his own bill to bar anyone convicted of a misdemeanor hate crime from obtaining a firearm.

"I was shaken to my core and I think that's an understatement," he said at the Capitol news conference Tuesday, recounting how his position changed after Sandy Hook.

On Wednesday he tweeted that he would cosponsor a bill to ban "bump stocks," accessories that help semiautomatic guns fire at increased speeds. The Las Vegas shooter had a dozen of them, the Bureau of Alcohol Tobacco and Firearms said, though it's not yet clear if they were used in the shooting.

Casey's shift on guns was the first step in a broader change in tone. Soon after he also revised his views on same-sex marriage and since last year has taken an aggressively combative posture toward President Trump and Republican policies, leading some liberals to now dub him "Woke Bob Casey."

On guns, "Senator Casey really sincerely had a personal kind of conversion," said Shira Goodman, executive director of CeaseFirePA. "I think he really does believe he was wrong and late to the game on it and is trying to make up for that."

But Casey's move has drawn the ire of gun owners' groups who oppose new restrictions and often vote on that issue alone.

The preferences of Republican primary voters make it all-but-certain that he'll face a rival next year who stands against tighter gun laws.

"I don't think he's representing the true values Pennsylvanians feel," said Rep. Lou Barletta (R., Pa.), the most prominent of several Republican contenders.

Barletta dismissed the 2013 push for tougher laws after Newtown, likening the proposals to banning spoons in order to stop obesity.

On Tuesday he said, "None of the laws that we're talking about" would have stopped previous mass shootings, "so it seems to me more politics than it is really getting down to why these things happen."

Among some of the other Republican contenders, State Sen. Rick Saccone led a petition against new gun laws in 2013, under the heading "No Surrender, No Compromise," and Jeff Bartos, a Montgomery County businessman, said in a statement Wednesday that Casey was using a "tragedy to push for additional laws that would not and will not prevent senseless violence."

For Casey, his new stand on guns carries some political risk in a state with a large rural population and deep hunting traditions, but it's mitigated by polls showing broad support for background checks and other laws the senator has backed, said Terry Madonna, a pollster at Franklin and Marshall College.

Ten years ago, it might have been different, he said, but now Democrats across the country see gun laws as a priority.

"Remember where their base is: Now they've become the urban and suburban party," Madonna said. On guns, Casey "is now where his party is."