NAIROBI (Reuters) - Just minutes after militants attacked a luxury hotel complex in Nairobi last month, the first ambulances roared up to collect wounded survivors.

Speedy medical help is taken for granted in the West, but many developing nations do not have centralized emergency command. Confusion during past attacks in Kenya cost lives.

This time, the response was far better, partly thanks to Flare, a new ride-hailing app whose ambulances were first to the dusitD2 hotel and office complex hit by Somalia’s al Shabaab.

“Flare was telling us what is happening, how to position our ambulances, how to evacuate, how to ask for additional resources,” said Kelvin Osano, ambulance fleet manager at the nearby private Avenue Hospital where the injured poured in.

The four gunmen and suicide bomber killed 21 people, just round the corner from another al Shabaab attack in 2013 that took 67 lives at the Westgate shopping center.

Back then, the medical response was “horrible,” Osano said.

There was no triage at the scene. Bleeding patients were bundled into vehicles without being stabilized. A security cordon prevented ambulances from coming close to victims.

Slideshow ( 7 images )

But at the hotel complex, ambulances scrambled by Flare - run by the Rescue.co company - arrived quickly after panicked calls from subscribers who had paid the 2,400 shillings ($24) annual fee. The first ambulance came within 12 minutes, and by the hour 20 were there.

Eric Ogot, a former nurse who mans the Rescue.co hotline, gave first aid by phone to office workers hiding as gunmen roamed. He helped triage patients remotely and assigned drivers. “Our job would be to try and be the calming presence,” he said.

In the absence of official information, Flare’s emergency number raced across Facebook, Twitter and WhatsApp.

Soon, it was not just individuals or business customers calling, but relatives of the missing too.

The nearby Australian High Commission agreed to be an ambulance staging post for Flare.

Police fed Rescue.co information.

Slideshow ( 7 images )

Peter Koome, a paramedic with charity St. John Ambulance, said the improved coordination, along with better training and access, certainly helped save lives.

Of 30 people badly wounded, all but two survived.

Americans Caitlin Dolkart and Maria Rabinovich founded Rescue.co in 2016. The Flare app works like ride-hailing and food-delivery services and now has tens of thousands of subscribers and 500 ambulances across Kenya.

Whereas Kenyans with an emergency are used to calling their closest hospital and ambulances often become ensnared in traffic, Flare streamlines services by monitoring ambulance locations and traffic conditions real time. Dolkart said it hopes to expand, both around the region and into fire and security services - building on its experience at dusitD2.