CAIRO (AP) — A Sudanese official says security agencies have freed five Egyptian soldiers who were abducted by an armed Libyan group in a remote area where the three countries meet.

Col. Mohamed Hamed, a spokesman for Sudan's security and intelligence agency, told reporters in Khartoum that the soldiers, including an officer, were freed Monday in a special operation by Sudanese forces.

Egypt's military issued a statement thanking Sudan for helping to return the soldiers, without providing further details. It's unclear when the soldiers went missing.

Egypt's President Abdel-Fattah el-Sissi met with Sudan's President Omar al-Bashir on July 20 in Khartoum.

Ties had frayed in recent months after Khartoum revived a longstanding border dispute and appeared to side with Ethiopia over its construction of a massive upstream Nile dam than worries Egypt.