Wildlife rangers on Friday hunted for up to six lions who escaped from Nairobi's national park and meandered into "highly populated" areas of the Kenyan capital.

Two lions were first spotted at 4am near a hospital in the suburb of Langata, and later near Kibera, Kenya's largest slum, said Kenya Wildlife Service spokesman Paul Udoto.

It is not clear how the lions got out of the park, most of which is surrounded by an electric fence.

A team of wildlife rangers tracking the lions aims to capture them and return them to the park, "but they are prepared for anything," Udoto said.

READ MORE: Zoo animals on the loose in Georgia amid deadly floods

Armed rangers, as well as KWS vets with dart guns, scoured bush and agricultural land alongside the Kibera district, one of Africa's largest slums.

"Lions are dangerous wild animals. Avoid provoking the lions by confronting them," Udoto said.

Earlier reports said that two lionesses had escaped but local media reported that as many as six lions were on the loose.

One fearful Nairobi resident tweeted KWS spokesman Udoto asking whether she should "lock my kids in".

"Yes, please do until we report lions have been captured and safely returned to the park. Perils of born town lions," Udoto replied.

Nairobi National Park is home to endangered black rhinos, lions, leopards, cheetahs, hyenas, buffaloes, giraffes and diverse birdlife. The animals roam just 10km from downtown Nairobi, which lies north of the park.

Occasionally lions will clash with people on the southern side, which is not fenced.

Only about 2,000 lions are left in Kenya; years of hunting and then poaching have reduced their numbers.

Source: AFP And AP