The US president is meeting survivors and bereaved families in Orlando, Florida, four days after the worst mass shooting in modern US history.
Hundreds of people gathered outside the Amway Center in the city centre as the president consoled relatives inside.
The aim of the visit, the White House has said, was to show that “the country stands with the LGBT community in Orlando as they grieve”.
A gunman claimed 49 lives on Sunday morning at a gay nightclub in the city.
The president embraced Orlando Mayor Buddy Dyer on the tarmac after he touched down in Air Force One.
Then he was driven to the city centre to meet the bereaved at the Amway Center.
Outside in sweltering heat, Brittany Woodrough waited in the hope of seeing the president.
She lost her friend, 19-year-old Jason Benjamin Josaphat, and said Mr Obama’s visit made her loss feel more real.
The attack – using a semi-automatic rifle – has sparked renewed calls for tighter gun laws and one member of Congress spoke for 15 hours on Wednesday in an attempt to force the Senate to act.
Democratic Senator Chris Murphy said he had secured a pledge from Republicans to hold a vote – but his recommendations are unlikely to pass.
He wants universal background checks and legislation to deny suspected terrorists the right to buy guns.
- Orlando gunman’s hometown ‘in shock’
- The rise of the rainbow flag
- How do you get denied a gun in Florida?
- What is the NRA and why is it so powerful?
- Orlando shooting: Special report
Orlando gunman Omar Mateen – who was shot dead at the club by police – was on a terror watch list while the FBI investigated him over inflammatory remarks. But they concluded he was no terror threat.
President Obama, who is accompanied in Orlando by Vice-President Joe Biden, has said the massacre shows the need to tighten up gun laws.
At the scene – Rajini Vaidyanathan, BBC News, Orlando
The piles of flowers, cards and letters outside Orlando’s Dr Phillips Centre for the Performing Arts are getting larger. In the baking heat, people continue to arrive at this memorial to the victims of the Pulse nightclub shooting.
Some kneel on the grass, bowing their heads in contemplation. Others embrace one another, before they leave their tribute. “Hate will never win,” reads one of the many signs. It’s a sentiment felt by many in the LGBT community here, who believe breaking down barriers of prejudice can be one lasting legacy from this horrific attack.
Across the city, rainbow flags have started to hang from shop fronts and outside bars and restaurants. As President Obama arrives here to meet the families, there’s hope he can bring comfort at this anguished time. But there’s also hope that this horror can bring harmony.
I met Milton McKnight, a local flower seller, who was wearing a President Obama cap while he was offering his condolences. The other solution, for him, is to restrict easy access to guns and to find better ways to deal with mental health issues.
Resting between bouquets, a sign in blue ink asks how many more lives will be lost. For some the grief is too raw to consider the politics. But for others, addressing the wider issues now is the only way to stop this from happening again.
Republican presumptive nominee Donald Trump has said anyone on a terror watch list should not be allowed to buy a gun.
He tweeted that he would meet the powerful National Rifle Association lobby group to discuss the gun control issue.
But opponents of changes to the law want guarantees that law-abiding Americans will not have their rights infringed upon.
Gun control is a very divisive issue in the US, where the right to bear arms is enshrined in the constitution.
While in Orlando, the president will also meet the doctors and paramedics who treated the wounded, several of whom remain critically injured.
It is unclear why Mateen, a 29-year-old born in New York, opened fire in Pulse nightclub as a Latin-themed party came to an end.
He pledged allegiance to the Islamic State group in several phone calls he made during the attack and it has also emerged that before or during it, he raged on Facebook about the “filthy ways of the West”.
There are also claims by friends and family that he had a hatred for gay people, although he had frequented this gay nightclub many times and used gay dating apps.