The gunman who killed 49 people in a nightclub in Orlando went on Facebook to see what reaction he was getting as it took place, it has been reported.
Killer Omar Mateen searched for the terms "Pulse Orlando" and "shooting" before and during the attack, according to a letter released by a Senate committee in the US.
"The real muslims will never accept the filthy ways of the west," Mateen, a 29-year-old American-born Muslim, wrote on one of at least five Facebook accounts believed to be associated with him.
That's according to the letter from Republican Senator Ron Johnson of Wisconsin, chairman of the Senate Homeland Security Committee.
The committee sent the letter to Facebook chief executive Mark Zuckerberg, asking for help uncovering the trail of hate Mateen left behind in cyberspace.
Senator Johnson did not explain how the committee obtained the information about Mateen's Facebook activity.
The. letter did not specify what took place when. But a person familiar with the situation said the Facebook posts came moments before the attack began.
"America and Russia stop bombing the Islamic state," Mateen wrote, according to the letter.
As he did in his call to a 911 operator during the massacre, Mateen pledged his allegiance on Facebook to the leader of Islamic State and, in his final post, warned: "in the next few days you will see attacks from the Islamic state in the usa."
However, CIA director John Brennan said the agency has found no connection between the gunman and any foreign terrorist organisation.
"As we have seen in Orlando, San Bernardino and elsewhere, ISIL is attempting to inspire attacks by sympathisers who have no direct links to the group," Mr Brennan told the Senate Intelligence Committee.
"Last month, for example, a senior ISIL figure publicly urged the group's followers to conduct attacks in their home countries if they were unable to travel to Syria and Iraq."
Facebook had no immediate comment on the Senate request for help.
The letter detailing Mateen's Facebook posts and searches in the final hours of his life came to light as Orlando prepared to bury the first of the dead.
President Barack Obama is also due to meet with victims' families and first responders today.
Investigators are trying to reconstruct Mateen's movements before the rampage at the Pulse dance club.
They are taking a close look at his 30-year-old Palestinian-American wife, Noor Salman, and what she may have known about the attack.
The three-hour rampage began at 2am and ended three hours later with Mateen being killed by a police Swat team.
The FBI said it is still gathering evidence at Pulse and analysing mobile phone location data to piece together Mateen's activities leading up to the massacre.