Madrid, Spain (CNN) -- A Spanish court Wednesday convicted five men accused of Islamic terrorist activities that included aiding fugitives from the Madrid train bombings of 2004 and planning other attacks.
The five men include three Moroccans, an Algerian and a Turk. Their sentences, on charges of collaborating or belonging to an Islamic terrorist group, range from five to nine years in prison, according to a copy of the court order viewed by CNN.
The court acquitted four other defendants, all Moroccans, on similar charges.
"During the years 2004 and 2005, the group provided cover and economic support and facilitated the flight from Spain for individuals who had roles" in the train bombings, the court said.
The group was based in a Barcelona suburb, Santa Coloma de Gramenet, before police made arrests in June 2005, officials said.
Some in the group also were involved in trafficking in weapons or explosives, or preaching violence for indoctrination of new militants, ruled a three-judge panel at Spain's high-security National Court.
The Madrid train bombings -- coordinated attacks on four morning-rush commuter trains -- killed 191 people and wounded more than 1,800.
Spanish courts previously had convicted 14 Islamic militants for their roles in the train bombings. Among them were four Spaniards convicted of trafficking in the explosives used in the attacks.