President Donald Trump blasted Beto O'Rourke on Wednesday morning over his plan to buy back assault weapons, saying O'Rourke's pledge during last week's Democratic primary debate has hampered efforts to pass gun-control legislation.

"Dummy Beto made it much harder to make a deal," Trump wrote. "Convinced many that Dems just want to take your guns away. Will continue forward!"

During Thursday's Democratic debate, O'Rourke said, "Hell yes, we're going to take your AR-15, your AK-47."

"We're not going to allow it to be used against fellow Americans any more," he added.

O'Rourke's call for mandatory gun buybacks came under swift criticism from conservatives and some Democrats, who felt it was counterproductive to passing gun-control measures in the aftermath of three mass shootings last month that left dozens dead.

"I frankly think that that clip will be played for years at Second Amendment rallies with organizations that try to scare people by saying Democrats are coming for your guns," Sen. Chris Coons, D-Del., told CNN last week.

Rep. David Cicilline, D-R.I., told "Fox News Sunday" that O'Rourke's "message doesn't help" with passing legislation. And on CNN's "State of the Union," South Bend, Indiana, Mayor Pete Buttigieg, also a 2020 presidential candidate, said "yes" when asked if the remarks played into Republicans hands.

"We have agreement among the American people for not just universal background checks, but we have a majority in favor of red-flag laws, high-capacity magazines, banning the new sale of assault weapons," Buttigieg said. "This is a golden moment to finally do something."

"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," he continued. "Let's make the most of it, and get these things done."

O'Rourke, a former Texas congressman who is polling at about 3 percent in the RealClearPolitics polling average of the Democratic primary field, responded to Buttigieg's remarks, criticizing the mayor for being afraid to push the envelope on guns.

"Leaving millions of weapons of war on the streets because Trump and McConnell are 'at least pretending to be open to reforms?'" O'Rourke tweeted. "That calculation and fear is what got us here in the first place. Let’s have the courage to say what we believe and fight for it."

O'Rourke further addressed the pushback to his remarks during a campaign stop in Texas on Tuesday.

"Donald Trump and Mitch McConnell pretending to be interested in something that is literally a life-or-death issue for 40,000 Americans — that's how many are killed every year through gun violence — is simply not enough," O'Rourke said. "We've got to represent the urgency, the big ideas, the boldness of people that we're listening to here today in Plano, but really all over the country right now. So yes, I hope that the field comes to the conclusion that most of the rest of this country has reached, which is we need action on this issue and we need it urgently."

"I just don't think that this is a time for half steps or half measures or being afraid of half the country," he added. "Engage with everyone — Republicans, gun owners, nongun owners alike, but come up with a solution that will address endemic violence that has taken the lives of more than 40,000 of our fellow Americans last year."

O'Rourke's campaign did not immediately respond to a request for comment from NBC News.

Trump's tweet comes as Congress remains at an impasse over gun-control legislation — in part because the president has not yet made clear what he would be willing to sign. On Wednesday, McConnell, the Senate majority leader, reiterated that Congress was "in a holding pattern" on gun-control measures until he hears what Trump will sign.

“I know I'm the majority leader, but I'm telling you, I want to know what the president supports," McConnell told reporters. "It's not unimportant to my members. And what I would like to know is what he thinks would make some progress and he would sign."

Trump has said he would veto a House-passed background-check expansion, and leading Democrats said McConnell and Trump were blocking action. Following the shootings last month, the president initially said he might support measures to tighten background checks on gun buyers. Polls, including one last month by NBC News and The Wall Street Journal, have shown that the vast majority of Americans support such checks on all firearm purchases and transfers.

"This is the moment for the president to do something different and courageous," Senate Minority Leader Chuck Schumer, D-N.Y., said. Schumer and House Speaker Nancy Pelosi, D-Calif., said Sunday that any gun-control package must include that House-passed background check bill.

Democratic candidates and prominent gun safety groups have been mostly unwilling to embrace the idea of mandatory gun buybacks, with some, like former Vice President Joe Biden and Sen. Bernie Sanders of Vermont, calling for making any buyback programs voluntary.

Other 2020 Democratic candidates have sought other proposals to make themselves stand out. Massachusetts Sen. Elizabeth Warren has called for a threefold and fourfold tax increase on guns and ammunition, respectively. New Jersey Sen. Cory Booker has made requiring a federal license to buy firearms a centerpiece of his campaign, and others, like O’Rourke, Warren and Buttigieg, have adopted similar plans.