ORLANDO, Fla. — President Barack Obama spent Thursday comforting survivors of the weekend’s deadly shooting in this shaken city before turning to address the nation with measured passion to denounce the easy accessibility of assault weapons and the destructive power of bigotry.

“We can’t anticipate or catch every single deranged person who may wish to do harm to his neighbors or his friends or co-workers or strangers,” Obama said. “But we can do something about the amount of damage that they do.”

Obama delivered his message after spending a few hours at the Amway Center, a sports arena that on Thursday lent itself to the grim task of bringing together first responders, victims’ families and survivors of Sunday’s deadly shooting at the Pulse, a popular LGBT nightclub in the city.

Forty-nine people were killed and 53 were injured in the early-morning shooting — the work, authorities said, of a lone gunman wielding an assault rifle and a semiautomatic pistol.

“I held and hugged grieving family members and parents and they asked, ‘Why does this keep happening?’ And they pleaded that we do more to stop the carnage,” the president said.

“Unfortunately our politics have conspired to make it as easy as possible for a terrorist or just a disturbed individual like those in Aurora and Newtown to buy extraordinarily powerful weapons, and they can do so legally.” Obama was referring to the 2012 mass shootings at a Colorado movie theater and the Sandy Hook Elementary School in Newtown, Connecticut.

advertisement | advertise on newsday

“This debate needs to change,” he said. “It’s outgrown the old political stalemates.”

But the familiar divisions on gun control continued apace in Washington on Thursday, with Democratic lawmakers pushing for a new ban on assault weapons and stricter background checks for gun purchases as Republicans braced in opposition and recast the focus on terrorism, not guns.

Obama said politics should not get in the way of preventing these types of tragedies.

“Here in Orlando, we are reminded not only of our obligations as a country to be resolute against terrorism. We are reminded not only of the need for us to implement smarter policies to prevent mass shootings. We’re also reminded of what unites us as Americans,” he said. “And that what unites us is far stronger than the hate and terror of those who target us.”

Legislation around gun control would “help end the plague of violence these weapons of war help inflict on young lives,” he said.

@Newsday

“And if we don’t act, we will keep seeing more massacres like this,” Obama said. “Because we’ll be choosing to allow them to happen. We will have said, we don’t care enough to do something about it.”

The president, flanked by Vice President Joe Biden, then cautioned against bigotry and hatred of all kinds, including over sexual orientation.

Pulse, the site of the shooting by gunman Omar Mateen, 29, had become a popular gathering place south of the city’s downtown for members of the lesbian, gay, bisexual and transgender community. The night of the attack had been a celebration of Latino pride at the club.

“You can’t break up the world into us and them and denigrate and express hatred toward groups because of the color of their skin or their faith or their sexual orientation, and not feed something very dangerous in this world,” Obama said.

The president began his speech noting the time he spent with survivors and victims’ families.

advertisement | advertise on newsday

“As you might imagine, their grief is beyond description,” Obama said. “Through their pain and through their tears, they told us about the joy their loved ones brought to their lives.”

The president’s visit resonated with many in this grieving city, including Capt. Mark Canty, SWAT commander with the Orlando Police Department, who told CNN he was among the first responders who met with the commander-in-chief.

“He said the whole nation is behind us, supports us,” said Canty, who responded to the nightclub shootings and helped save lives that night.

Víctor Almodovar, who lost his “little brother” Stanley Almodovar in the shootings, said though his family was not able to attend the meeting with Obama, he and his relatives were grateful that the president made the trip.

“I loved that he took the time,” Almodovar said. “I think it makes a strong statement that he actually cares about what happened.”

advertisement | advertise on newsday

Stanley Almodovar, a pharmacy technician from Clermont, a city west of Orlando, died while being treated at the hospital.

The presidential party reached the Amway Center shortly after 1:30 p.m. A single family left by a side door about an hour later and declined to speak with reporters.

After two hours, Obama and Biden visited a memorial outside the Dr. Phillips Center for the Performing Arts in the center of downtown Orlando across from city hall.

They left at 4 p.m.

Obama also was accompanied on the trip by Sen. Marco Rubio (R-Fla.), a former Republican presidential candidate, and Rep. Corrine Brown, a Central Florida Democrat.

Republican Florida Gov. Rick Scott, Sen. Bill Nelson (D-Fla.), Orange County Mayor Teresa Jacobs and Orlando Mayor Buddy Dyer met the president on the tarmac after Air Force One landed at Orlando International Airport.

Jacobs said Obama spoke briefly to her and he expressed “his sympathy and concerns,” and she thanked him.

“It means a tremendous amount to our whole community and to the whole country” that the president is visiting, Jacobs said. It’s comforting “to see the president so involved and so engaged, and he’s here to meet the families, to greet the first responders. It means everything.”

With AP