Turkey is building its first base in Africa. Last week, Turkish Foreign Ministry official Emil Tekin confirmed that Ankara has broken ground on a...

Turkey is building its first base in Africa. Last week, Turkish Foreign Ministry official Emil Tekin confirmed that Ankara has broken ground on a new military installation in war ravaged Somalia.

The Turkish army intends for the facility to be a training center for Somali troops. The fledgling Somali National Army — with the help of African Union troops and American commandos — has been fighting a war with Al Shabaab insurgents for years.

In addition to the new base, Turkey plans to open a school for Somali military officers.

The announcement comes not long after Turkish officials announced in December that they will open a new base in Qatar that is slated to be home to as many as 3,000 troops.

Though this will be Turkey’s first permanent military base in Somalia, the Turks are hardly newcomers. During the years of the Ottoman Empire, Turks frequently made their way to Somalia as both warriors and merchants. In 1969, Somalia and Turkey were among the founding members of the Organization of Islamic Cooperation.

But like most countries, Turkey closed its Mogadishu embassy in 1991 as a result of the danger posed by the bloody civil war that enveloped the nation and led to years without a functioning central government.

Turkish troops played a role in efforts to resolve the conflict. Turkish army Lt. Gen. Çevik Bir served as the force commander for the UNOSOM II peacekeeping operation that was stationed in Somalia from 1993-1995.

In 2011, then Turkish Prime Minister Recep Tayyip Erdogan (now the country’s controversial president) shocked Somalis during a visit by openly walking the streets and visiting refugee camps. Ankara signed a military training agreement with Mogadishu in May 2010, and has been an important partner in trade and foreign aid.

In October 2013, the Somali government granted Turkish firm Al Bayrak a contract that will see the company manage the Port of Mogadishu for at least 20 years. The firm agreed that 55 percent of earnings from the port will go to Somali authorities while Al Bayark takes the remaining 45 percent as profit.

Turkish businessmen, contractors and officials are a relatively common site in Somalia. On Jan. 1, unidentified gunman opened fire on a mosque in northern Mogadishu, killing one and wounding several, including a Turkish aid worker.

Above and at top — the Turkish land forces. Turkish army photos

While Qatari and Somali officials have welcomed the Turks with open arms, other countries have shown less excitement about Turkey’s more adventurous military policy.

Ankara recently ran afoul of Baghdad after sending a detachment of troops and tanks near the Islamic State’s Iraqi stronghold of Mosul. Turkish officials insisted the troops were there to protect advisers — whose presence Iraqi national authorities already weren’t thrilled about — training Kurdish peshmerga and Sunni forces opposed to the Islamic State.

In addition, Turkish advisers were supporting a Sunni dominated but multi-ethnic militia group under the command of exiled Ninevah province governor Atheel Al Nujaifi, a Sunni. The militia includes residents of the Ninevah plains who seek to oust the Islamic State from their homeland.

Nujaifi previously told War Is Boring that he hoped the group can become part of the Iraqi National Guard and receive funding and weapons from the central government. But Shia politicians in Baghdad have called the militia illegal and criticized Nujaifi. The peshmerga and Turkish military are the only ones who’ve given the group support.

Despite working with Kurdish troops in the north, Baghdad called the Turkish military presence in Iraqi Kurdistan an “illegal incursion.” After a series of tense negotiations, Erdogen relented and agreed to withdraw most Turkish troops from the area.

Distrust of Turkish intentions runs deep in Iraq and Syria. Many Kurdish activists accused Turkish troops and officials of disrupting Syrian-Kurdish YPG fighters as they tried to hold the Kurdish town of Kobani on the Syrian-Turkish border. Turkish troops prevented Kurdish PKK troops from transiting through Turkey to join the battle.

Eventually, Iraqi-Kurdish officials — whose relationship with Turkey has greatly improved in recent years by the flow of oil and cash between the two — were able to convince Turkish officials to allow a detachment of peshmerga troops to cross the border and reinforce the YPG. But Ankara’s relationship with most Kurdish groups continues to be hostile.

Turkey has long been accused of playing both sides in the conflict in Iraq and Syria. But recent bombing attacks in Turkey have made Ankara much more concerned about confronting Islamist terror groups. In 2016, don’t be surprised to see Turkish troops and advisers pop up in surprising places.