Turkey has launched a major military base in Somalia. The $50 million facility is designed to provide support and training to troops of the war-torn country which is struggling to rebuild its national security forces.

Turkey opened the new military training facility south of Somalia’s capital city Mogadishu Saturday. Senior officials, including Turkey's Chief of General Staff Hulusi Akar and Somalia’s Prime Minister Hassan Ali Khaire attended the opening ceremony, which is expected to house and train at least 1,000 soldiers at a time.

Waxaan maanta xariga ka jaray dugsi cusub oo lagu tababaridoono ciidamadeena oo ey noo dhiseen dowladda eynu wallalaga nahay #Turkeypic.twitter.com/omNJpxxh2q — Hassan Ali Khaire (@somaliaMP) September 30, 2017

The facility is Turkey’s biggest overseas military base, the Somali PM said. Khaire added that the training facility will help Somalia to “reconstruct” a truly national force “not based on clan... not from a particular place, but well-trained forces that represent the Somali people.”

Maanta wuxuu dalkeenu ku socdaa jidkii horumarka iyo dhismaha ciidanka, si taas loo xaqiijiyo waa in la helaa ciidan difaaca dalka #Somaliapic.twitter.com/B7udnZY1YA — Hassan Ali Khaire (@somaliaMP) September 30, 2017

The base, spread over 4 square kilometers, has been under construction for the past two years, and cost some $50 million, according to media reports.

Despite the optimistic tone of the officials, the situation in the country, which has been in turmoil for decades, remains fragile. An insurgency, spearheaded by the al-Shabaab terrorist group persists. On Thursday, at least 7 people were killed in Mogadishu, when an explosive device went off near the Hamarweyne market.

WATCH MORE: At least 7 killed, scores injured in Somalia bomb blast

Just ahead of the opening of the Turkish base, jihadist militants attacked a government military facility outside the capital killing some 17 soldiers. The militants breached the base’s defenses with suicide car bombs and seized control of the site along with a nearby town.