Updated

A Somali police officer is warned on his walkie-talkie that a suspicious car is approaching in the pitch darkness. Alerted, police at the partially-lit checkpoint immediately stop incoming cars, frisk passengers and search for explosives.

However, some cars had already passed through unrestricted and tension spreads among the jittery soldiers, who are chewing khat, leaves that are stimulants. They say they don't want a bomb-laden vehicle to pass through their check-point and then explode in Mogadishu.

The KM4 junction is the seaside capital's busiest intersection and a hub that links key government centers. It's one of the most strategic checkpoints for the city, yet the police at KM4 say they lack essential equipment to check the hundreds of cars that cross there each hour.

Mogadishu has regained a measure of stability since 2011 when the Islamic extremist rebels of al-Shabab were pushed out of the city with an estimated population of 2.5 million. African Union troops and the Somali army now control all parts of the city, but the rebels continue to carry out sporadic terrorist bombings at government offices, restaurants and other gathering spots.

To try to prevent the violent attacks, the Somali police have roadblocks at key points around the city. At the KM4 junction, government vehicles, African Union convoys and civilian traffic come together at the dusty junction, putting pressure on the troops deployed there.

The troops don't have metal detectors or other equipment to search cars. And they are missing another important tool: sniffer dogs. Although the canines are very good at finding explosives, the use of sniffer dogs seems to be an unattainable dream in Somalia, where the conservative Muslim population reject sniffer dogs because touching them is "haram" (sinful).

During car searches, some of the passing drivers and passengers had to show identification while others passed unchecked. After failing to find the suspicious car, the exhausted soldiers relaxed a bit, leaving few fellow soldiers to watch the flow of vehicles that went by without being searched.

"It's really challenging, we regularly search cars, yet that can't fully stop the terror," said Osman Ali, a police officer, continually listening to his raucous walkie-talkie. "It's not something new, it's a global problem."

As the al-Qaida-linked al-Shabab militants continue attacks against key targets in the capital, security services work hard to stop them, deploying many soldiers across the seaside capital to maintain security.

Somalia's security forces, helped by the African Union forces, have succeeded in bringing relative stability for one of the world's most dangerous cities, which suffered through chaotic violence for more than 20 years.

"Despite some challenges, our heroic forces have so far done very well," said Dahir Amin Jesow, a member of the Somali parliament who heads a security committee for the legislative body.

"What they have achieved is much bigger than what they haven't," said Jesow. "That has really lowered our enemy's morale."

Hundreds of suspected militants and accomplices have been arrested, reducing the number of militants trying to assassinate those they suspect of working with the government.

"They're losing the frontline battle, therefore, bombing is their sole power now," said Bashir Haji, a soldier, waving by a passing car at KM4. "We intercept more than they manage to escape with."

Even though the police have achieved a great deal, attacks continue to rock Mogadishu. A car bomb parked by a hotel parking lot killed at least five people and injured 15 others on Nov. 8. That day soldiers also arrested another suspected suicide bomber who stacked his explosives inside a laptop bag following a premature explosion.

The Islamic extremists staged some of their most spectacular attacks earlier this year, including an April attack on Mogadishu's court by gunmen and suicide bombers that killed at least 25 people, and an attack in June at the United Nations compound in which 19 people were killed.

A serious challenge to security is corruption. Briberies create chances for militants to pass undetected and stage more attacks, say worried authorities and residents.

The Somali police are paid irregularly and their failure in preventing attacks is criticized by the public.

"Our problem is corruption. Number 1," said Abdiaziz Omow, a cafe owner in Mogadishu. "That's the biggest problem debasing us. Not only soldiers are to blame, their commanders are the masterminds of this wicked problem," he said angrily during an interview at his premises.

To improve security in Somalia, the African Union has deployed 17,300 troops, coming from Burundi, Djibouti, Kenya, Sierra Leone and Uganda. The African Union force backs up the Somali police and together they patrol the streets, operating side by side at night.

"If we don't do this, Al-Shabab will exploit the gap," said a Ugandan police soldier leaning on an armored Casper truck parked by the roadside.

"They are battling a weakened but dangerous group that changed its tactics," said Mohamed Sheikh Abdi, a political analyst in Mogadishu. The rebels made themselves less visible in order to strike more deadly blows, although with lesser frequency, he said. "This makes it difficult for the security forces to deal successfully with the fighters," said Abdi.

The soldiers manning the KM4 checkpoint continue their job of stopping and searching vehicles because they say they want peace and a brighter future for Somalia.

"Triumph will be ours, they will end up in failure and loss," said policeman Osman Ali. "Peace will prevail after all."