CAIRO — The U.S. military said Friday it lost an unmanned drone aircraft over the Libyan capital, Tripoli, where rival armed groups have been fighting for control of the city for months.

The U.S. Africa Command said the drone was lost Thursday while assessing the security situation and monitoring extremist activity.

AFRICOM did not give a reason for the drone’s loss, but said it was investigating. It said drone operations in Libya were “fully coordinated with appropriate government officials.”

Since 2015, Libya has been divided between two governments, one based in Tripoli and the other in the country’s east. Forces loyal to the eastern government have been trying to wrest control of the capital since April.

An Italian drone was shot down Wednesday southeast of Tripoli by forces loyal to the eastern government.

In September, the U.S. military said it carried out several airstrikes against the Islamic State group in Libya, killing more than 40 militants. Those were the first U.S. strikes in the North African country in over a year.

Oil-rich Libya descended into chaos in 2011, when an international military coalition helped rebels overthrow longtime autocrat Moammar Gadhafi. Islamic extremists have exploited the chaos to expand their reach in the country.