An accused Somali pirate has pleaded guilty to two counts of conspiracy from a November 2008 attack in the Gulf of Aden on a Danish ship carrying cargo from a U.S. company.

Speaking through an interpreter, Jama Idle Ibrahim entered his guilty plea in U.S. District Court on Wednesday to conspiracy to commit piracy and conspiracy to use a firearm in a crime of violence. The agreement stipulates that Ibrahim will serve 25 years in prison, but a judge could alter the terms during sentencing.

Prosecutors say it represents the first plea for a piracy-related offense in the District of Columbia.

No sentencing date has been set.

Ibrahim also pleaded guilty last month to piracy-related charges for attacking a U.S. Navy ship.