Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The deaths of four American soldiers in an ambush in Niger on Wednesday highlight America's increasingly deep and broad military commitments in Africa.

With conventional troops and special forces officially operating in dozens of countries, including direct involvement in at least four active conflicts, America has become enmeshed in the fortunes of allies spanning a range of political ideologies and reliability.

These operations include regular drone and airstrikes, as well as commando raids aimed at decapitating nascent Islamic terror groups across the continent. In Libya and North Africa, American troops are targeting ISIS forces and Al Qaeda in the Islamic Maghreb, or AQIM; in Somalia they are seeking Al-Shabaab militants; and in the Lake Chad region they are hunting Boko Haram extremists.

Established in October 2007, Africa Command, known as AFRICOM, is the newest of America’s six geographic combatant commands, and is currently headed by Marine General Thomas Waldhauser. With a multi-billion dollar budget and thousands of troops and dozens of aircraft at its disposal, AFRICOM has quietly expanded its reach and influence across the continent, establishing formal partnerships with 13 African countries.

The stated goal of AFRICOM is to "disrupt and neutralize transnational threats, protect U.S. personnel and facilities, prevent and mitigate conflict, and build African partner defense capability and capacity in order to promote regional security, stability and prosperity."

"America is not at war in Africa," U.S. Army Brig. Gen. Donald C. Bolduc told NBC News during a visit last year. "But its partner forces are."

Related: U.S. Soldier Missing in Niger After Ambush Is Found Dead

AFRICOM spokesman Col. Mark Cheadle said Friday that enemy forces were killed in the encounter Wednesday, but an exact number was not clear. The mission was not meant to be an engagement with the enemy, and the threat at the time seemed unlikely and there was no piloted air cover, he said. At least one Nigerien soldier was killed, sources said.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

A glance at the map of the U.S. military’s temporary facilities and ongoing operations shows that AFRICOM has built the logistics and infrastructure to monitor, and when necessary to attack, targets in any corner of the continent.

A U.S. special forces soldier demonstrates how to detain a suspect during Flintlock 2014, a U.S.-led international training mission for African militaries, in Diffa, Niger March 4, 2014. Joe Penney / Reuters

Over the past 10 years, AFRICOM has also become an epicenter of "train, advise and assist" programs as part of the U.S. Global War on Terror. The bulk of these missions have fallen to its subsidiary unit, Special Operations Command Africa, or SOCAFRICA.

"Africa is considered a Low-Intensity Conflict area and so far the U.S. footprint in Africa, although grown in recent years has only increased incrementally," Derek Gannon, a former Green Beret who writes extensively on American operations in Africa for the military website SOFREP.com, said in a phone interview. "It's what is called Low Intensity Irregular Warfare, yet technically it’s not considered war by the Pentagon."

"But warfare is warfare to me," Gannon said.

Many of SOCAFRICA’s operations are conducted by U.S. Army Special Forces — known as Green Berets — who work with local militaries in an effort to professionalize their forces, often with little support by American warfighting standards.

The mission in Niger was a classic example of this type of program. It was the first time U.S. forces were killed in Niger.

"U.S. Forces are in Niger to provide training and security assistance to the Nigerien Armed Forces, including support for intelligence, surveillance and reconnaissance efforts, in their efforts to target violent extremist organizations in the region," said U.S. Navy Lt. Cdr. Anthony Falvo. "One aspect of that is training, advising and assisting the Nigeriens in order to increase their ability to bring stability and security to their people."

There are technically only two American military bases — officially dubbed "Forward Operating Sites" — that fall under AFRICOM’s purview: Camp Lemonnier in Djibouti, and a joint U.S.-U.K. signals intelligence facility on Ascension Island, a British territory in the middle of the South Atlantic Ocean.

A U.S. Army carry team transfers the remains of Army Staff Sgt. Dustin Wright of Lyons, Georgia, at Dover Air Force Base in Delaware on Oct. 5, 2017. Aaron J. Jenne / U.S. Air Force via Reuters

Camp Lemonnier is an airbase and logistics hub near a strategic location in the Gulf of Aden. It has seen a massive expansion over recent years, and its airbase is used to support operations in Yemen, as well as in the Horn of Africa.

But these two Forward Operating Sites tell only part of the story of AFRICOM’s expansion. In 2009, the command also identified 10 “Cooperative Security Locations,” or CSLs: shared facilities where partner nations hosted an American presence.

By 2017, the number of CSLs had increased to 13, and AFRICOM also identified 31 “Contingency Locations” — facilities which host U.S. troops for ongoing operations, but only on a temporary basis, according to Robyn Mack, a spokesperson for AFRICOM.

Independent researchers have previously found evidence of American military involvement in at least 49 African countries.

Another indicator of AFRICOM's growing clout is the increase in Offices of Security Cooperation across the continent. These are military missions hosted in U.S. Embassies, which oversee training partnerships, military sales and coordinate with partner nations on a wide-range of security issues.

In 2008, the U.S. had nine of these offices in Africa. By 2016, that had expanded to 36, according to data provided by AFRICOM.

"Our core mission remains one of helping our partners to strengthen defense capabilities," Mack said. AFRICOM, she said, was committed to “helping African nations and regional organizations build capable and professional militaries that respect human rights, adhere to the rule of law, and more effectively contribute to stability in Africa."

On Wednesday, the price of that commitment was paid in American and Nigerien lives.