Zarkasih (L) and Abu Dujana (R) were convicted of helping other militants
Two senior leaders of Indonesia's most notorious militant group, Jemaah Islamiah (JI), have received 15-year jail terms for terror-related offences.
Abu Dujana and Zarkasih were each convicted of harbouring terrorists as well as possessing, storing and moving firearms and ammunition.
They both told the Jakarta court they would consider launching appeals.
JI is accused of carrying out a string of attacks in South East Asia, including the 2002 Bali bombings.
Abu Dujana and Zarkasih were arrested within a week of each other last summer in what was seen as a huge victory for Indonesia's fight against Islamic militants.
Although Zarkasih is a more senior leader in JI, analysts have said that Abu Dujana probably had more influence on rank and file JI members.
At the time of the arrests, police described Zarkasih as the "amir of Jemaah Islamiah" and claimed Abu Dujana had played a role in almost all bomb attacks in the country.
Abu Dujana is thought to have trained in Afghanistan and to have close links to al-Qaeda.
On sentencing him, Judge Wahjono, at the South Jakarta District Court, said he had been "proven legally and convincingly of having engaged in the crime of terrorism".
Noordin Mohamed Top, bombmaker and head of splinter group, still on the run
Alleged leader Zarkasih, in police custody
Alleged military leader Abu Dujana, jailed for 15 years
Bomb expert Azahari Husin, shot dead by police in 2005
Abu Bakar Ba'ashir, alleged JI spiritual leader released from jail in 2006
Amrozi, Imam Samudra and Ali Ghufron, on death row for 2002 Bali bombings
Hambali, alleged JI operations chief, held in Guantanamo Bay
The judge also ruled that JI was a terrorist organisation - the first such ruling by an Indonesian court.
Prosecutors had asked for life sentences for both men, but the judge said they had co-operated with investigators and spoken out against violence, says the BBC's Lucy Williamson in Jakarta.
Indonesia has a policy of using former militants to help persuade those still within radical networks to defect, our correspondent adds.
The 35-page indictment against Abu Dujana accused him of authorising shipments of explosives to attack Christians in Poso in central Sulawesi, an area fraught by inter-religious tensions.
At the start of the trial, prosecutors told the court that Abu Dujana had sheltered and aided senior militants including Malaysians Noordin Mohamed Top and Azahari Husin.
Azahari was killed in a police raid in 2005 but Noordin is still on the run.
Abu Dujana was not charged with any specific bomb attacks, but the court heard that he had been made head of JI's military wing in May 2004.
Zarkasih told the authorities he had been made caretaker leader of JI after a "leadership vacuum" emerged in 2004.