Pirates have returned to the waters off Somalia, but the spike in attacks on commercial shipping does not yet constitute a trend, senior U.S. officials said Sunday.

The attacks follow about a five-year respite for the region, where piracy had grown to crisis proportions during the 2010-2012 period, drawing the navies of the United States and other nations into a lengthy campaign against the pirates.

U.S. Defense Secretary Jim Mattis told reporters at a military base in the African nation of Djibouti, near the Gulf of Aden, that even if the piracy problem persists, he would not expect it to require significant involvement by the U.S. military.

At a news conference with Mattis, the commander of U.S. Africa Command said there have been about six pirate attacks on vulnerable commercial ships in the past several weeks.

"We're not ready to say there's a trend there yet," Marine Gen. Thomas Waldhauser said, adding that he views the spurt of attacks as a response to the effects of drought and famine on the Horn of Africa.

He said he was focused on ensuring that the commercial shipping industry, which tightened security procedures in response to the earlier piracy crisis, has not become complacent.

Navy Capt. Richard A. Rodriguez, chief of staff for a specially designated U.S. military task force based in Djibouti, said piracy "certainly has increased" in recent weeks. But he said countering it is not a mission for his troops, who are focused on counterterrorism in the Horn of Africa and developing the capacities of national armies in Somalia and elsewhere in the region.

Anti-piracy patrolling is among several missions China cited for constructing what it calls a naval logistics center in Djibouti. The base is under construction, and U.S. officials say they don't see it as a major threat to interfere with American operations at Camp Lemonnier.

Several other countries have a military presence on or near that U.S. site, including France, Italy, Germany and Japan. This reflects Djibouti's strategic location at the nexus of the Red Sea and the Gulf of Aden.

Mattis made a point of spending several hours in Djibouti during a weeklong trip that has otherwise focused on the Mideast. As a measure of his concern for nurturing relations with the Djiboutian government, he flew four hours from Doha, Qatar, and then flew right back.

At his news conference, Mattis praised Djibouti for having offered U.S. access to Camp Lemonnier shortly after the Sept. 11 attacks.

"They have been with us every day and every month and every year since," he said.

The U.S. rotates a range of forces through Lemonnier and flies drone aircraft from a separate airfield in the former French colony. U.S. special operations commandos are based at Lemonnier for counterterrorism missions in Somalia and elsewhere in the region.

During Mattis' visit, elements of the 24th Marine Expeditionary Unit, including V-22 Osprey aircraft and Harrier attack jets were visible on Lemonnier's airfield.

The U.S. military presence has grown substantially in recent years, as reflected by construction of a new headquarters building, gym, enlisted barracks and other expanded infrastructure.

Djibouti has a highly prized port on the Gulf of Aden. The country is sandwiched between Somalia and Eritrea, and also shares a border with Ethiopia.

Mattis is using the early months as defense secretary to renew or strengthen relations with key defense allies and partners such as Djibouti, whose location makes it a strategic link in the network of overseas U.S. military bases.

Djibouti took on added importance to the U.S. military after 9/11, in part as a means of tracking and intercepting al-Qaida militants fleeing Afghanistan after the U.S. invaded that country in October 2001.

The U.S. has a long-term agreement with Djibouti for hosting American forces; that pact was renewed in 2014.

Over the past week Mattis has met with leaders in Saudi Arabia, Israel, Egypt and Qatar.