Senators from both parties are imploring President Trump to take a leading role in pushing for gun-control legislation, arguing that his political cover is vital to passing a bill — and to keeping Republicans from getting punished in the upcoming midterms for inaction.

“I think he knows that the mood of the country has shifted, such that he and his party are going to pay a huge price in the polls in 2018 and 2020 if they don’t start supporting things like universal background checks,” Sen. Chris Murphy (D-Conn.), a major proponent of gun control, said on ABC News’s “This Week.”

“If he and Republicans don’t start showing some movement in the wake of Parkland, there aren’t going to be as many Republicans around for him come 2019 for his entire agenda and perhaps for his political salvation,” the senator continued.

Murphy was one of several Democrats who praised Trump last week for his words during a Wednesday meeting with congressional leaders to discuss potential responses to the shooting at Marjory Stoneman Douglas High School in Parkland, Fla., last month that left 17 dead. At the meeting, Trump upended long-held GOP bargaining positions on guns, not only endorsing expanded background checks, but also lending support to a ban on assault weapons and stating that when it comes to confiscating weapons, authorities should “take the guns first, go through due process second.”

In the days since, White House staffers have scrambled to temper that message, while the president held a meeting with National Rifle Association leaders in the Oval Office that he later deemed “Good (Great)” on Twitter. The NRA opposes several of the measures Trump seemed to endorse Wednesday, including a provision to raise the minimum age for all gun purchases from 18 to 21.

But advocates of gun legislation in Congress hope that Trump will not be swayed by the pushback from the NRA, which endorsed him as a candidate and has politically supported him as president.

“He can set his legacy: President Trump coming forth to something like this and putting his support behind will give Republicans enough cover to support this,” said Sen. Joe Manchin III (D-W.Va.), who co-authored with Sen. Patrick J. Toomey (R-Pa.) a 2013 bill to require universal background checks. That bill, which failed to pass the Senate, came in the wake of a shooting at Sandy Hook Elementary School in Newtown, Conn., that left 26 children and teachers dead.

Manchin, speaking on CBS News’s “Face the Nation,” added that he believed that “if President Trump would have been president in 2013, that bill would have passed.”

He said he would also take the challenge Trump offered Toomey and include a provision to raise the minimum age for purchasing firearms from 18 to 21 in their bill, which Manchin said “should be the base bill” for gun-control efforts in Congress.

But the senator cautioned against adding a provision to ban semiautomatic weapons, such as the AR-15, to that bill. An AR-15 was used in the Parkland shooting, police said.

“That would not help our bill at all . . . and I’ve told Dianne that,” Manchin said, referring to Sen. Dianne Feinstein (Calif.), the top Democrat on the Judiciary Committee and a longtime advocate for an assault weapons ban.

Manchin also endorsed a new effort from Sen. Lindsey O. Graham (R-S.C.) that would let police or relatives of an individual who shows “red flags” to petition the court to seize that person’s firearms. The bill, which was announced last week and which Graham plans to introduce with Sen. Richard Blumenthal (D-Conn.) in the coming days, is modeled after laws in states like Indiana that let a judge temporarily restrict access to guns when a person shows serious signs of being a danger to themselves or others.

“Most Americans believe we should solve problems that Americans are facing, like gun violence and school safety problems,” Graham said on “Face the Nation.”

He, too, commended Trump for getting involved in the gun-control debate, and he noted that there will be consequences for lawmakers who do not follow suit.

“The president did a good job talking about — we should be able to do something to stop shootings like this,” Graham said. “If we don’t take this up, and if Democrats don’t work with us, we’ll all suffer — and we should.”