Less than 10 days into his new job as commander of U.S. Africa Command, Army Gen. Stephen Townsend traveled to the African continent for the first time and visited the Republic of Djibouti and Somalia.

So why does this matter to America?

While the trip served as an opportunity for AFRICOM’s fifth commander to meet and connect with commanders, service members and U.S. ambassadors to both countries, and to meet with African leader such as Somalia’s prime minister and the chief of defense and minister of defense for the Republic of Djibouti, the visit had broader implications for America.

It signaled the importance of the relationships, the strength of the partnerships, as well as what is potentially at stake.

Since 2003, Djibouti has served as host to Combined Joint Task Force-Horn of Africa. Djibouti and the U.S. share common interests in counter-terrorism, anti-piracy, and regional stability. Djibouti is where a sizable portion of the roughly 7,000 U.S. forces on the African continent serve, and its area of responsibility extends to 12 East African countries.

Djibouti is also the place where the People’s Republic of China opened its first overseas military base. It is an area where China is heavily involved in financing and building key infrastructure, which is telling given that Djibouti overlooks one of the world’s busiest shipping lanes. The African continent is where China’s government has actively demonstrated an intent to focus on and prioritize activity. China’s influence is growing there, and it’s viewed as a place of opportunity.

There is no lack of opportunities to partner in Africa. The African continent is roughly 3½ times the size of the United States. If pressed, few in the U.S. would be able to tell you that there are 54 countries in Africa. While there is significant opportunity to partner, ungoverned space has become susceptible to the influence of violent extremist organizations. Enhancing our partners’ ability to counter these threats today represents a tremendous potential return of investment for the United States tomorrow.

To help combat this threat, AFRICOM is training African forces in places such as Somalia. The U.S. is in a supporting role to the Somalis and an international United Nations, African Union, European Union, and African Union mission there. AFRICOM is helping to build and train the Danab. The Danab are specially trained Somali forces who are taking the fight to the al-Shabaab terror organization.

While al-Shabaab may not have strong name recognition in the U.S., their allegiance to al-Qaida, the group responsible for the attacks against America on Sept. 11, 2001, certainly does. Today, al-Shabaab stands 5,000 to 7,000 strong with the potential to expand and spread if not confronted.

Degrading groups like al-Shabaab today matters to Africa, and it matters to the United States.

As Gen. Townsend said on the trip, “Evildoers are out there. They are looking for an opening and an opportunity to do harm. If they could attack U.S. interests and the homeland they would. We can’t give them an opening.”

Gen. Townsend is no stranger to the aims of similarly affiliated terror groups. After all, he was the leader responsible for surges that liberated Mosul, Iraq, and Raqqa, Syria, as the commander of CJTF-Operation Inherent Resolve. He also has extensive experience in Afghanistan with Operation Enduring Freedom.

The ability to reduce the influence of violent extremists and strengthen partner networks requires a collective approach and teamwork. Otherwise, these groups could eventually pose a legitimate threat to America.

From what I observed on the visit, it is clear the quality of training provided by the U.S. in places like Somalia and Djibouti is valued and viewed by African partners as the “gold standard” and a key component to their security advancements. As much was communicated by our African partners last week in Djibouti and Somalia.

During his visit to Africa, Gen. Townsend let every commander and service member know the significance of their jobs and its direct implication on national interests and security. Separated geographically by thousands of miles, he also communicated his trust in each service member to get the job done.

Trust was the theme extended to partner nations as well. As he put his hand on the shoulders of both Somali and U.S. forces alike, he connected with both, seeing what was needed, and where progress was occurring.

During the trip, he recognized nearly 40 U.S. and African service members with decorations, recognition coins or simply words of encouragement. He took extra time to listen intently and understand the stories of those serving on the continent, as well as their role in mission accomplishment. He highlighted how trust and teamwork were keys to mission success as well as the quality and strength of partnerships.

It was obvious there is confidence in the training AFRICOM provides. Just as our forces gain an enhanced appreciation for operations in a specific region, African partners view what is provided by the U.S. as an investment in their future, empowering their ability to better address challenges at hand.

This first of many visits provided strong reassurance to our East African partners. It communicates the U.S. is paying attention and they can rely on our continued support where mutual interests exist. This is important because the consequences of not paying attention may not bode well for the United States and our allies. In this case an ounce of prevention is worth a pound of cure. After all, not engaging can prove costly.

Air Force Col. Christopher Karns is the spokesman for U.S. Africa Command.

Editor’s note: This is an Op-Ed and as such, the opinions expressed are those of the author. If you would like to respond, or have an editorial of your own you would like to submit, please contact Military Times managing editor Howard Altman, haltman@militarytimes.com.