The gunman in a casino rampage in Manila was seen on security camera footage firing his M4 rifle in the air, setting fires and shooting at security forces in a stairwell during an attack that left at least 38 people dead.

Isis has claimed responsibility for the rampage in the Philippine capital early on Friday, but authorities say it looked like a botched robbery by one attacker and that there was no obvious link to terrorism.

The victims appeared to have died of smoke inhalation as they hid from the gunman, who doused gambling tables with gasoline and set them ablaze, police said. He later killed himself in a hotel room.

“He’s crazy, that guy is crazy,” Philippine President Rodrigo Duterte said, in his first public comments on the attack. He discounted any links to Isis, saying the terror group “is more cruel and brutal”.

A CCTV image apparently showing the gunman opening fire inside the casino (AP)

Many in Manila feared after the attack began that it was linked to ongoing battles with Muslim militants aligned with Isis in the southern city of Marawi. The fighting has placed much of the country on edge, prompted Mr Duterte to declare martial law across the south and raised fears that Isis is gaining a foothold in the country.

The Philippines has faced Muslim insurgencies for decades, though much of the violence has occurred in the troubled south.

At a news conference, authorities showed the security footage to the media and said the gunman’s identity was still unknown. The taxi driver who dropped the gunman off at the casino said the man spoke fluent Tagalog and appeared normal during the ride, said Manila police chief Oscar Albayalde.

He said terrorism was unlikely because the gunman didn’t shoot anybody.

“He could have shot everybody there,” Mr Albayalde said. “You see he was even changing magazines, he changed magazines at least three times. With all that ammunition, he could have killed hundreds of people inside that establishment. But he did not shoot anybody ... he just burned the casino. Burning the casino could be a diversionary tactic for his escape.”

National Police Chief Ronald dela Rosa also said the attack did not appear to be terrorism, but he cautioned that authorities still know very little about the attacker.

“What if we establish the identity and there are leads that will lead toward terrorism? So our findings, our conclusion, will possibly change,” he told DZMM radio.

According to police, the gunman stormed into the Resorts World Manila complex early on Friday and used petrol to torch gambling tables. The fire caused clouds of smoke that killed 37 people from smoke inhalation, Albayalde said. The gunman fled to an adjoining hotel and killed himself.

The attacker set fire to gambling machines in the casino (AP)

Police described the suspect as an English-speaking, fair-complexioned man in his 40s who was at least 6ft tall. He was armed with an assault rifle but did not shoot anyone during the attack, police said.

Luchie Arguelles, 61, was playing the slots at around 12.10am on Friday when she saw the man enter the room.

“[He was] all dressed in black, burly, everything was covered, you can’t even see his eyes,” said Mrs Arguelles, who was about 30 feet from the gunman. She said he was holding two small bottles of liquid and dousing the baccarat table.

“I said, ‘He’s going to burn that table, he’s going to douse it’,” before she grabbed her husband’s hand and started running.

There have been concern that the militants might attack elsewhere to divert the focus of thousands of troops trying to quell the siege in Marawi.

The attack occurred at a sprawling mall-like complex near the Manila airport that includes hotels, restaurants, stores and a multi-floor gambling area. Police said that during the attack the gunman stole more than $2m worth of casino chips, though he apparently abandoned them in a bathroom soon after.

As the gunman left, he exchanged fire with a building guard who managed to shoot him in the leg after being wounded, police and casino officials said.

“Severe blood loss from the gunshot wound significantly slowed the assailant down and resulted in his holing up in a room, where he took his own life,” said Stephen Reilly, Resorts World’s CEO.

The attack sent hundreds of people fleeing through the complex and into the night. More than 70 people suffered mostly minor injuries in the stampede to escape.