Discuss as:

Hunt for terrorists shifts to 'dangerous' North Africa, Panetta says

Pablo Martinez Monsivais / AFP - Getty Images

Secretary of Defense Leon Panetta, left, speaks with the President of Djibouti Ismail Omar Guelleh during a visit to Camp Lemonier in Djibouti on Tuesday.

CAMP LEMONIER, Djibouti - U.S. Defense Secretary Leon Panetta said Tuesday that U.S. operations against al-Qaida are now concentrating on key groups in Yemen, Somalia and North Africa.

Panetta said efforts against the al-Qaida affiliates depend on American partnerships with countries like Djibouti, a key regional ally that hosts the Combined Joint Task Force-Horn of Africa, the only U.S. base in sub-Saharan Africa.

"It's fair to say that the United States is intent on going after al-Qaida wherever they locate, and making sure they have no place to hide," said Panetta, who was making his first trip to Djibouti.

As the U.S. winds down operations in Iraq and begins its methodical withdrawal from Afghanistan, the U.S. military has increasingly focused on Africa — particularly the north, where insurgents have found sanctuary.

The military base in this tiny port nation is the launchpad for U.S. drones used for intelligence, surveillance and, at times, strikes against insurgents in terror hotspots.  The more than 3,000 U.S. service members assigned represent all U.S. military services, including 500 members of the National Guard, NBC News reported.

A senior defense official described the security situation in Djibouti as "quite dynamic," NBC News journalists traveling with Panetta reported.

President Obama touts the end of the divisive Iraq war and warns Iraq's neighbors that the US would remain a major player in the region even as it brings its troops home. Watch his entire statement.

"They have been very good partners, there when we need them. A tiny country in a very dangerous part of the continent," the official told NBC News.

U.S. officials have acknowledged that as the threat from al-Qaida leaders in Pakistan declines — largely due to U.S. strikes that have killed insurgents or kept them on the run — affiliated groups in Africa and Yemen have taken on more active and dangerous roles.

The worry is that militant groups — including al-Shabab in Somalia and al-Qaida in the Arabian Peninsula in Yemen — operate out of safe havens in lawless countries.

"Our goal is to make sure that wherever they go, we go after them and make sure that they are not able to ever develop the kind of planning that would involve attacks on our homeland," Panetta told reporters traveling with him.

Panetta told U.S. troops stationed in Djibouti that he will visit Libya, becoming the first Pentagon chief to travel to the embattled country, which is emerging from an eight-month civil war. He said he will also travel to Iraq in the coming days for a ceremony marking the end of the U.S. military mission there after nearly nine years at war.

More militant connections?
Militants based in Somalia and Yemen have been at the heart of a number of deadly terror attacks in the region, and several near-misses in the U.S.

The Somalia-based al-Shabab, which is linked to al-Qaida, unleashed twin bombings in Kampala, Uganda, that killed 76 in 2010. The group is particularly worrisome because it has recruited dozens of Somali-Americans, particularly young men, to travel to Somalia and take up the fight.

On Christmas Day 2009, a Nigerian man tried to blow up an airliner over Detroit during a flight that originated from Lagos, Nigeria.

U.S. and European officials also worry that al-Qaida in the Islamic Maghreb — which operates in the west and north of Africa — is working to establish links with al-Shabab and the Nigerian group Boko Haram.

Panetta met with Djibouti President Ismail Omar Guelleh as well as some of the U.S. troops based in the country.

U.S. defense officials said Djibouti is planning to deploy some troops to the Somalia mission, joining forces from Uganda and Burundi who are working to push al-Shabab back, particularly from key areas around the capital region.

Panetta's plan to visit Libya comes amid ongoing violence there, including recent clashes between revolutionary fighters and national army troops near Tripoli's airport.

Panetta said Libya reflects the ongoing changes in the region after the Arab Spring, and said the U.S. wants to help Libyans move in the right direction as the people take back their country. With military assistance from the U.S. and NATO, Libyans ousted and later killed longtime leader Moammar Gadhafi earlier this year.

NBC News, msnbc.com  and The Associated Press contributed to this report.

Read more content from msnbc.com and NBC News: