The US president has met grieving families and survivors of the mass shooting in Florida as he urged congress to act against high-powered assault guns.
President Barack Obama says the US must act to control gun violence and fight home-grown terrorism as he met survivors of a massacre at an Orlando gay nightclub and relatives of the 49 people killed.
Obama and Vice President Joe Biden arrived in Orlando, Florida, four days after a US-born gunman claiming allegiance to various Islamist militant groups carried out the deadliest mass shooting in modern US history.
Police killed the gunman, Omar Mateen, 29, a US citizen born in New York to Afghan immigrants.
Obama said he "held and hugged" grieving family members before laying flowers at a memorial for the victims of the attack on the Pulse nightclub.
Orlando mourned the dead after what was also the worst attack in America on the lesbian, gay, bisexual and transgender community.
Wakes were under way for at least three victims - Kimberly Morris, Anthony Luis Laureano Disla and Roy Fernandez.
Twenty-three of the 53 wounded remained hospitalised, six in critical condition, according to the Orlando Regional Medical Center.
"The last two terrorist attacks on our soil - Orlando and San Bernardino - were home-grown," Obama told reporters, before urging congress to pass measures to make it harder to legally acquire high-powered weapons like the assault rifle used in the attack on Sunday.
"I'm pleased to hear that the Senate will hold votes on preventing individuals with possible terrorist ties from buying guns," he said.
New details emerged on Thursday about the gunman's activity on Facebook and text messages he sent during the shooting rampage.
Islamic State claimed responsibility for the attack but US officials have said they do not believe Mateen was assisted from abroad.
CIA Director John Brennan told a Senate intelligence committee hearing on Thursday that the agency had "not been able to uncover any direct link" between Mateen and militants abroad.
A married couple also claiming allegiance to IS shot dead 14 people in San Bernardino, California, in December.
During his attack, Mateen posted messages on Facebook and called a news station.
One Facebook message, apparently referring to air strikes against IS by the US and its allies, said: "You kill innocent women and children by doing us air strikes ... now taste the Islamic State vengeance," according to US Senate homeland security committee chairman Ron Johnson, who asked Facebook to turn over material from Mateen's accounts.
Also during the three hours he was holed up in a bathroom inside the nightclub, Mateen exchanged text messages with his wife, Noor Salman, CNN reported, citing a law enforcement official it did not identify.
Salman is under investigation to find out whether she knew about Mateen's plans ahead of time.
Local news website TCPalm reported that Mateen, who worked as a security guard, was frequently suspended while he was in junior high and high school, and was passed to the next grade despite poor academic performance, citing records from St. Lucie County schools.
Mateen carried out the slaughter with an assault weapon and handgun that had been legally purchased although he had twice been investigated by the FBI for possible connections with militant Islamist groups.
Obama reiterated his frustration over the failure of the US Congress to pass any gun control measures in more than two decades. The massacre put pressure on congress to act.