Dozens of people are feared dead in a fire that started after a gunman burst into a Manila casino and set gaming tables alight in what is thought to be a failed robbery attempt.

Philippines president Rodrigo Duterte’s spokesman, Ernesto Abella, said at least 36 people had died, mostly due to suffocation following the blaze.

The unidentified lone gunman who stormed the entertainment resort early on Friday died after setting himself alight as armed officers searched the building, police said.

National police Chief Dela Rosa earlier said the attacker “was killed by our troops”, but later confirmed the suspect had killed himself after firing at officers. “He burned himself inside the hotel room 510,” Dela Rosa told a media conference. “He lay down on the bed, covered himself in a thick blanket and apparently doused himself in gasoline.”

Police said later they were looking at a “person of interest” in connection with the attack. Tomas Apolinario, chief of Manila’s southern police district, said the person was still alive and was believed to be a Philippine national.

South Korea’s foreign ministry said one South Korean died of an apparent heart attack after being evacuated from the casino and that three others had light injuries from the stampede and smoke set off by the attack.

The venue owner, Resorts World Manila, said security guards and police tracked the gunman down at about 7am, after the midnight attack, and that he set himself on fire and shot himself. Fifty-four people have been taken to nearby hospitals, it said. It is unclear whether they are injured or dead.

Armed police were deployed about 2am on Friday after gunfire and loud bangs were heard inside the building. Dozens of people were injured as they tried to escape, before officers gained control of the situation.

The man walked into one of the gambling rooms, set fire to tables and fired an M4 rifle but did not appear to have shot anyone, the national police chief Ronald Dela Rosa said earlier.

“We cannot attribute this to terrorism,” he told the local radio station, DZMM. “We are looking into a robbery angle because he did not hurt any people and went straight to the casino chips storage room. He parked at the second floor and barged into the casino, shooting large TV screens and poured gasoline on a table setting it on fire.”

Dela Rosa said the suspect was “foreign-looking, a Caucasian, about six feet tall”.

The man was briefly on the run but, about five hours later, local and national police chiefs both said he had died. However, Oscar Albayalde of the Manila police office said the man had taken his own life, while Dela Rosa was quoted as saying his men had shot him.

A fire was still burning on the second floor of the building on Friday morning, the local Fire Protection Bureau’s spokesman, Ian Manalo, said. The military’s spokesman, Restituto Padilla, said: “We are monitoring the situation. The police are on top of the situation. We will issue a statement when we have a complete picture of the incident.

The Philippine Red Cross said it had taken three people to hospital after the incident, which happened at around 2am local time (6pm GMT). Pictures circulating on social media showing smoke pouring out of a building at Resort World Manila, which is close to the city’s airport.

The Manila Times quoted Fernando Atienza, a representative of the aid organisation, as saying that at least 25 people had been injured and some people had suffered serious injuries because they jumped from the second floor of the hotel. The resort’s chief operating officer, Stephen Reilly, confirmed that shots had been fired and that the building was in lockdown.

“I heard many, many gunshots,” Julio Silva, a witness who managed to dash out of the mall complex, told DZMM radio network. Other witnesses who spoke to local radio stations said several gunmen had been seen in the complex.

The news channel, ANC, earlier said there were two gunmen wearing masks and black clothes. At about 3.30am local time, it said, the gunshots stopped, but the gunmen were not believed to have been captured. The information could not be immediately verified

A spokesman for the nearby Ninoy Aquino airport told the Guardian: “Terminal three has been locked down because it is near the Resort World. We still don’t know how this will affect flights.” Terminal three manages international and domestic flights.

The Philippines’ armed forces have been fighting a militant faction sympathetic to Islamic State and, initially there were fears that the Manila incident was an attack launched by the terror group.

A fierce 10-day battle has been raging in the southern Philippine city of Marawi, about 500 miles (800km) south of Manila and, last week, the Philippine president Rodrigo Duterte imposed martial law across the southern region of Mindanao, arguing that the measure was necessary to crush a rising threat posed by Isis-linked rebels.

In Marawi, the army has deployed helicopter gunships and artillery fire to try to dislodge the gunmen, but they have held a large section of the city.

Over the past week, security forces have been deployed to other cities in Mindanao province, concerned that the militants may attempt to launch attacks outside Marawi.

The clashes started after security forces tried to capture Isnilon Hapilon, an Islamist militant leader who is the subject of a $5m (£3.88m) reward offered by the FBI and endorsed by Isis.

Hapilon is believed to be a senior leader in a coalition of insurgent groups in the Philippines, although their operational links with Islamic State in the Middle East remain unclear.

The clashes there have left at least 171 people dead and Duterte said last week he may need to declare martial law across the rest of the country if the threat spread.

He has said he fears that the “terrible ideology” of Isis will spread on Mindanao, an island of 22 million people, and has warned that it could become a haven for supporters fleeing Iraq and Syria.

Concerns about Isis involvement in the Manila incident were heightened when the Site Intelligence Group, a US-based organisation that monitors militant websites, reported that a Filipino Islamic State operative had claimed responsibility. But police poured cold water on the claims within hours.

The US president, Donald Trump, passed on the thoughts and prayers of the American people to those impacted by the incident. Speaking in the White House Rose Garden, Trump said: “It is really very sad as to what’s going on throughout the world with terror.” He added that he was “closely monitoring the situation” and would continue to provide updates.