NAIROBI/MOGADISHU (Reuters) - The size and methods of the latest truck bombing in Mogadishu show how international and Somali government efforts to stop the killings are failing, partly because intelligence gathering to counter such attacks is so disjointed, security sources say.

FILE PHOTO: Civilians evacuate from the scene an explosion in KM4 street in the Hodan district in Mogadishu, Somalia October 14, 2017. Picture taken October 14, 2017. REUTERS/Feisal Omar/File Photo

More than 300 people were killed in the bombing in the heart of the capital on Saturday, the deadliest attack in the history of the Horn of Africa nation. The Islamist insurgency al Shabaab was blamed for the blasts, which happened when a car bomb and a truck bomb headed for the airport detonated prematurely.

Somali security services and the donor nations working with them are both to blame for disorganization in the divisions that are supposed to be working to detect and stop such attacks, said Hussein Moalim Mohamud Sheikh Ali, a former national security adviser to the president.

“The national security architecture is in tatters,” he told Reuters. “The Shabaab attacks are a symptom of the greater political dysfunction of the state.”

The increasing frequency and growing size of the attacks threaten the fragile security gains made in Somalia ahead of the withdrawal of African Union peacekeepers at the end of the year. They also are a concern for other countries in the region where al Shabaab is active, such as Kenya and Uganda.

In 2016, 723 people died in 395 attacks in Somalia, up from 46 dead in 36 attacks in 2010, according to a confidential report produced earlier this year by Nairobi-based thinktank Sahan Research.

Initial swab tests at the site of the attack showed traces of potassium nitrate, a fertilizer component, indicating al Shabaab is now manufacturing explosives as well as buying them or harvesting them from munitions, experts say.

Competing programs funded by different donor nations and the lack of a centralized database are hurting efforts to analyze intelligence related to improvised explosive devices (IEDs), four Western and one Somali security source told Reuters.

A letter from Somalia’s minister of internal security addressed to the United States, Britain and the United Nations in May complained of competition and secrecy among agencies gathering intelligence.

“Multiple actors involved means this process is highly disorganized ... causing a severe problem for the governmental counter-terrorism efforts,” said the letter, seen by Reuters.

The pressure is building on President Mohamed Abdullahi Mohamed, who must ensure Somalia’s fledgling security forces are ready to step in when the 22,000-strong AU force leaves.

His government is already stalling on releasing a report into a joint U.S.-Somali raid on Bariire in August that residents say killed 10 civilians. Political disagreements threaten co-operation between Somalia’s federal and regional forces.

Last week the minister of defense and army chief resigned, without giving reasons. The interior ministry spokesman resigned this week.

Somali police did not respond to requests for comment.

HIGH-GRADE EXPLOSIVES

Obtaining high-grade military explosives - the material that makes a bomb explode - involves harvesting them from captured munitions, or buying them from someone else.

Making their own explosive allows the insurgents to build more and bigger bombs, according to the Sahan report and an upcoming report from a U.N. panel of experts that monitors an arms embargo on Somalia.

According to the U.N. report which is due to be published next month, the U.S. Terrorist Explosive Device Analytical Center, which is funded by the Federal Bureau of Investigation, has confirmed the presence of potassium nitrate in six major vehicle-borne bomb incidents since 2016.

“The potential use of HME (home-made explosive) by al Shabaab would allow the group to rely less on the process of harvesting explosives from munitions, which is slow and laborious … allow(ing) the militant group to increase the frequency and explosive weight of its IEDs,” said the report.

Al Shabaab, which wants to overthrow Somalia’s U.N.-backed government and impose strict Islamic law, has not yet claimed responsibility for Saturday’s attack, in keeping with previous incidents in which large numbers of civilians have been killed.

Mass civilian deaths have caused deep divisions among fighters, a security source with knowledge of discussions within the group said.

A former top al Shabaab commander, Mukhtar Robow Abu Mansur, condemned the attack and was photographed by local media donating blood. Robow defected to the government in August after the U.S. government removed a $5 million bounty for his capture.

Two Mogadishu-based security sources outlined the events leading up to the latest attack to Reuters.

They said a car bomb and a truck bomb were deployed to hit Mogadishu International Airport, a warren of buildings ringed by barbed wire and blast walls that house contractors, diplomats and a European Union military training mission.

“One bomb would have breached a checkpoint, opening the way for a larger bomb,” one of the Western security contractors told Reuters. “They also had fighters nearby ready to come inside the base.”

The driver of the car bomb had been driving through checkpoints for a week ahead of the attack, paying small bribes and getting security forces used to his presence, he said.

A larger truck entered the city and passed through one checkpoint, but was stopped at one known as Kilometer Five. Panicking, he tried to force his way through, but got snarled in traffic next to a fuel truck.

“I could see the truck speeding. I also heard few gunshots behind it. Police must have been chasing it,” said Mohamed Ali, 21, who was injured in the blast.

“As it advanced it came to many cars in the street, then the truck driver swerved abruptly to the left lane, but its tyres got stuck in the highway divider. What followed was the blast and smoke.”

The fireball tore through the intersection, incinerating hundreds of civilians. Many were too badly burned to be identified and were buried in mass graves.

The driver of the car bomb was detained at another checkpoint by soldiers who had taken him out for questioning before its bomb also detonated.

Three security sources told Reuters he identified himself as al Shabaab.