An anguished and angry President Joe Biden called for new restrictions on firearms Tuesday night after a gunman massacred 18 children at a Texas elementary school. “We have to act,” Biden told the nation, after years of failure to pass new laws.

“When in God’s name are we going to stand up to the gun lobby?” Biden said at the White House shortly after returning from a five-day trip to Asia that was bookended by tragedy.

With first lady Jill Biden standing by his side in the Roosevelt Room, the president said, “It’s time we turned this pain into action.”

At least 18 students were killed in Texas, according to a state senator who said he was briefed by law enforcement. One teacher was killed. So was the gunman.

“To lose a child is like having a piece of your soul ripped away,” Biden said. “There’s a hollowness in your chest. You feel like you’re being sucked into it and never going to be able to get out.”

Just two days before Biden left on his trip, he met with victims' families after a hate-motivated shooter killed 10 Black people at a grocery store in Buffalo, New York.

The back-to-back tragedies served as sobering reminders of the frequency and brutality of an American epidemic of mass gun violence.

“These kinds of mass shootings rarely happen anywhere else in the world," Biden said. "Why?”

It's unclear if the latest tragedy will change the political dynamic around guns after so many others — including the 2012 shooting at Sandy Hook Elementary School in Connecticut that killed 26, including 20 children — failed to do so.

In a reminder of the issue's divisiveness, Biden's call for gun control on Tuesday was booed at a campaign event in Georgia hosted by Herschel Walker, a Republican running for U.S. Senate.

Vice President Kamala Harris said earlier that people normally declare in moments like this, “our hearts break — but our hearts keep getting broken ... and our broken hearts are nothing compared to the broken hearts of those families.”

“We have to have the courage to take action ... to ensure something like this never happens again,” she said.

White House press secretary Karine Jean-Pierre said Biden was briefed on the shooting aboard Air Force One.

Shortly before landing in Washington, he spoke with Texas Gov. Greg Abbott from the presidential plane “to offer any and all assistance he needs in the wake of the horrific shooting in Uvalde, TX,” White House communications director Kate Bedingfield tweeted.

Biden directed that American flags be flown at half-staff through sunset Saturday in honor of the victims in Texas.