Updated

Six Somalis who allegedly attacked a Spanish warship in 2012 off the coast of Somalia went on trial in the Spanish capital, with prosecutors seeking a 23-year sentence for each defendant.

A National Court spokesman said Monday the six are charged with piracy, weapon possession and membership of a criminal group.

The six were arrested in January 2012 following a shootout when they allegedly tried to board the Patino vessel. The Defense Ministry said the attackers possibly mistook the warship for a freighter.

The six claim they are fishermen and had approached the ship for help.

The Patino formed part of a European Union flotilla fighting piracy in the Indian Ocean.

The trial is expected to end Wednesday.

The official spoke on condition of anonymity because of court rules.