US Defence Secretary Mark Esper warned of the global threat of terrorism and accused China and Russia of trying to undermine African countries, on the first day of his trip to Maghreb countries on Wednesday. Speaking at a cemetery in Carthage, Tunisia, where the remains of more than 2,800 American soldiers mostly from the Second World War are buried, he warned of the worldwide threat posed by "violent extremists". Mr Esper also accused US rivals China and Russia of continuing "to intimidate and coerce their neighbours while expanding their authoritarian influence worldwide, including on this continent." He said Moscow and Beijing's behaviour aimed to "undermine African institutions". Mr Esper signed a 10-year military partnership with Tunis and praised the two nations’ work in addressing the conflict in neighbouring Libya. There has been growing co-operation between the Pentagon and Tunisia in the past decade, particularly in counter-terrorism training and securing the long border with war-torn Libya. "We look forward to expanding this relationship to help Tunisia protect its maritime ports and land borders, deter terrorism and keep the corrosive efforts of autocratic regimes out of your country," Mr Esper said after meeting President Kais Saied. Washington in 2015 classified Tunisia as a major non-Nato ally, allowing for military co-operation. The two sides regularly hold joint exercises, and since 2011 Washington has invested more than $1 billion in the Tunisian military, says the US Africa Command, or Africom. The deal signed on Wednesday, full details of which have not been disclosed, covers training and after-sales service of sophisticated American weapons, US officials said. Tunisia in 2016 denied a report in <em>The Washington Post </em>that it had allowed the US to operate drones from its territory for missions in Libya against ISIS. But a court martial in 2017 in a case of sexual harassment by an American officer publicly confirmed the presence of an American squadron operating drones from within a Tunisian base in the northern region of Bizerte. The US has "regained interest" in long-time allies Tunisia and Morocco, Tunisian analyst Youssef Cherif said. Mr Cherif said much of it was caused by the growing influence of extremist groups in Libya and the Sahel region since the fall of former Libyan dictator, Muammar Qaddafi. "But Tunisia does not seem to have given its approval to use its airspace and its territory to conduct attacks," he told AFP. In May, the head of Africom said the US would send more troops to Tunisia because of the deteriorating situation in Libya, sparking an outcry in the country. Africom later explained it would be posting only "a small training unit" that would not engage in combat, and the Tunisian government said there were no plans for an US base. Mr Esper also met Tunisian Defence Minister Ibrahim Bartagi and gave him a replica of a pistol belonging to George Washington, the military leader who became the first president of the US. The two spoke of Tunisia's role in Mali, a country hit by terrorist attacks, and where Tunis has sent troops to take part in a 13,000-strong UN peacekeeping force. Mr Esper was set to visit neighbouring Algeria on Thursday, becoming the first US defence secretary to do so since Donald Rumsfeld in 2006. He will then head to Morocco, the other US major non-Nato ally in the region.