A former employee of the Philippines' finance department who was heavily indebted because of a gambling problem was behind a fire attack on a casino complex which killed 37 people.
The suspect, Jessie Carlos, 42, who had three children, was dismissed from the Department of Finance for misdeclaration or non-disclosure of assets and liabilities, said Director Oscar Albayalde, chief of the Manila police force.
"This is not an act of terrorism but this incident is confined to the act of one man alone as we have always said," Albayalde said.
Authorities have repeatedly dismissed a claim of responsibility by the Islamic State group for Friday's attack on Resorts World Manila.
Albayalde said the man had sold off property to support his gambling habit of at least several years, including a vehicle. His family had grown so concerned they had asked casinos in the capital to ban their husband since April 3.
The news came after authorities released security footage showing Carlos casually exiting a taxi just after midnight and walking calmly into a vast entertainment and gambling complex like any other visitor. Shortly afterward, he dons a black ski mask, slips on an ammunition vest and pulls an M4 carbine assault rifle out of his backpack.
What follows borders on the surreal: a slow-motion arson attack and robbery so methodical and unhurried, the gunman appears to walk much of the way - even as he exchanges fire with a security guard and flees, slightly wounded, up a stairwell.
At least 37 patrons and employees died, mostly from smoke inhalation as they tried to hide on the second floor, including one the casino's VIP rooms, police said. The gunman fled to an adjoining hotel where police say he killed himself.
The video footage shown to reporters Saturday appears to bolster the government's case that this was a botched robbery by a lone attacker with no known link to terrorism. Police said that's exactly why they wanted to release it.
Philippine President Rodrigo Duterte said the attacker was simply "crazy."
He questioned what the gunman was going to do with the $US2 million ($NZD2.8 million) horde of poker chips he had tried to haul away. He also discounted any links to the Islamic State group, saying this "is not the work of ISIS. The work of the ISIS is more cruel and brutal."