U.S. Rep. Eric Swalwell on Friday said the U.S. government would use its nuclear weapons in a hypothetical war against Second Amendment supporters refusing to give up their firearms.

The California Democrat, who is openly considering a run for the Democratic Party’s presidential nomination in 2020, made the outlandish remark on social media after a gun-rights advocate pointed out that the lawmaker once called for gun owners to surrender their assault weapons.

“So basically @RepSwalwell wants a war. Because that's what you would get. You're outta your f------ mind if you think I'll give up my rights and give the [government] all the power," Joe Biggs tweeted at Swalwell.

This prompted Swalwell to defend himself, saying it would be a “short war” because “the government has nukes,” implying the government would use its nuclear arsenal against its own citizens.

The comment drew an immediate backlash, with thousands of people criticizing the lawmaker for the ill-thought-out remark.

“Here is an actual member of the U.S. Congress talking about using nuclear weapons against Americans,” David Freddoso wrote.

“Personally, I have a bigger problem with an elected official blithely talking about nuking his fellow Americans than my neighbor owning an AR-15,” Cam Edwards tweeted.

Swalwell -- a member of both the House Judiciary Committee and the House Intelligence Committee -- tried to defuse the situation, saying the need for a firearm to protect against the government is “ludicrous” and suggested that if an assault weapon ban would happen, people would just follow the law.

He later clarified that he was merely being facetious in his suggestion about the use of nuclear weapons. “I sarcastically point[ed] out USA isn't losing to his assault weapon (it's not the 18th Century),” he wrote.

Meanwhile, Swalwell appeared Friday on HBO’s "Real Time with Bill Maher" show, talking about his potential plan to run for president, saying he’s “considering” it. The lawmaker, who will turn 40 in November 2020, would be the youngest candidate ever elected president.

He also came out unapologetically for his fellow California Democrat Nancy Pelosi, backing her for the House speaker position, and promising to use the Democratic House majority to investigate President Trump and pressure the president to release his tax returns.