President Trump stops to talk to members of the media as he walks from the Oval Office to board Marine One on the South Lawn of the White House on Monday. (Jabin Botsford/The Washington Post)

President Trump said Wednesday it has become “much harder” to reach a deal with Democrats on gun legislation, blaming an emphatic call by former congressman Beto O’Rourke (Tex.) for a mandatory buyback program for assault-style weapons.

O’Rourke created one of the most memorable moments of last week’s Democratic presidential debate in Houston when he spoke passionately about a need for gun control in the wake of recent mass shootings. “Hell, yes, we’re going to take your AR-15, your AK-47,” he said, referring to his support for mandatory buybacks of war weapons.

“Dummy Beto made it much harder to make a deal. Convinced many that Dems just want to take your guns away,” Trump said on Twitter, adding: “Will continue forward!”

His tweet comes as Congress waits for Trump to announce what gun-related proposals he would support following a spate of mass shootings, including back-to-back massacres last month in El Paso and Dayton, Ohio.

Senate Majority Leader Mitch McConnell (R-Ky.) said Tuesday that Congress remains “in a holding pattern” while awaiting guidance from the White House.

“I’m still waiting for guidance from the White House about what [Trump] is comfortable signing . . . and hopefully making some progress,” McConnell said.

Following last week’s debate, O’Rourke said that his buyback plan would be “not voluntary.”

Republicans seized on O’Rourke’s comments, using them to broadly paint Democrats as overly eager to confiscate firearms, while some Democrats suggested the remarks were not helpful in persuading Republicans to embrace more modest changes, such as expanding background checks for gun purchasers.

O’Rourke responded to Trump on Twitter later Wednesday morning, accusing the president of cowardice.

“To be clear: We will buy back every single assault weapon,” he wrote. “We’ll also license every gun & do a background check on every buyer. That’s what the American people want — and deserve. The only thing stopping us from ending this epidemic is you & your cowardice. Do the right thing.”

O’Rourke also reacted on Twitter to a report that Senate Minority Leader Charles E. Schumer (D-N.Y.) had said other Democrats do not agree with O’Rourke on a mandatory buyback program.

“The party is with us, the country is with us,” O’Rourke tweeted. “Now it’s time for Democrats to lead.”

O’Rourke’s critics have included South Bend, Ind., Mayor Pete Buttigieg, a Democratic presidential rival.

Asked on CNN’s “State of the Union” on Sunday whether O’Rourke’s blunt comment was “playing into the hands of Republicans,” Buttigieg said: “Yes.”

“When even this president and even Mitch McConnell are at least pretending to be open to reforms, we know that we have a moment on our hands,” Buttigieg said. “Let’s make the most of it and get these things done.”

O’Rourke responded on Twitter, saying what McConnell and Trump might be interested in “is not enough.”

“Neither is poll-testing your message,” O’Rourke wrote. “Gun violence is a life-or-death issue — and we have to represent the bold ideas of people all over the country.”

Trump’s tweet on Wednesday appears to have been inspired by criticism of O’Rourke on Monday by Fox News host Jesse Watters. Trump included a reference to a Fox News program on which Watters said: “The Democrats have always wanted to take your guns. Beto is the one stupid enough to say it.”

During a television appearance on Wednesday morning, Rep. Tim Ryan (Ohio), another Democratic presidential candidate, said O’Rourke’s views shouldn’t affect the outcome of a congressional debate over gun legislation.

“Beto’s not in Congress, so his opinion shouldn’t have anything to do with it,” Ryan said on CNN.