An Indonesian court has sentenced bombmaker Umar Patek to 20 years' jail for his role in the 2002 Bali bombings, bringing to an end a 10-year probe into the nation's deadliest attack.
Patek, 45, was found guilty of six charges, a number of which related to the twin suicide bombings on a Bali nightclub and bar that killed 202 people, including 88 Australians.
"We sentence Umar Patek to 20 years in jail," chief judge Encep Yuliardi told the West Jakarta district court on Thursday.
Patek was found guilty of premeditated murder linked to the Bali bombings, and other charges related to the Christmas Eve bombings in 2000 on several churches that killed 19 people in Jakarta.
Upon hearing his fate, Patek stood up and shook the judges' and prosecutors' hands, before hugging his own lawyer and walking past reporters out of the court.
His lawyer Asludin Hatjani told the AFP news agency that he would hold a consultation with Patek and his family on Friday to discuss whether his client wanted to appeal.
"Umar Patek is very disappointed with the sentence and considers it too severe. He has been honest and admitted what he's done, and he feels the court has not taken that into consideration."
The decisions were made by a panel of five judges, who delivered their verdict after a gruelling 11-hour hearing observed by more than 100 journalists, many of whom were Australian, spilling out of the small courtroom.
About 300 police had guarded the courtroom all day and four snipers stood atop neighbouring buildings, West Jakarta police chief Widodo told AFP.
Prosecutors had sought a life sentence, sparing Patek from the firing squad - which executed three other key players in the Bali attacks - because he had shown remorse during the four-month trial.
Patek claimed he was "against it from the start" and had tried to stop the attack at the 11th hour. He has also apologised to victims and their families.
But, Yuliardi said: "He should know that no matter how small his role, the result is loss of lives.
"He had said he disagreed with it, but he could have rejected and could have considered not following the orders of his seniors or at least report to the authorities."
Before his arrest, Patek was the most-wanted "terrorism" suspect in Indonesia and the US had a $1m bounty on his head.
After more than eight years on the run he was arrested in the Pakistani town of Abbottabad in January 2011, where US commandos killed al-Qaeda leader Osama bin Laden four months later.
He was extradited to Indonesia in August.
During the trial Patek maintained he played a minor role in assembling the explosives and denied having any bombmaking expertise.
But US Federal Bureau of Investigation special agent Frank Pellegrino testified in April that Patek was well known as an expert bombmaker among fighters in the region.
Pellegrino said the FBI had collected evidence that Patek planned to kill US troops and suggested he went to Abbottabad to meet bin Laden before his arrest - a claim Patek has repeatedly denied.
Patek was the last suspect detained in Indonesia to be tried for the attacks.
"Indonesians and the international community have long waited for this case to be over," prosecutor Bambang Suharyadi said last month.
The 2002 Bali bombings triggered a long crackdown in Indonesia, focused on weakening the al-Qaeda-linked Jemaah Islamiyah (JI) network blamed for the bombings.
Anti-terror squads trained by Australian and US police have conducted bloody raids, killing Dulmatin and Noordin Mohammed Top, suspected of helping orchestrate the attacks, and Malaysian Azahari Husin, an alleged bombmaker.
Indonesia also executed three men in 2008 - Imam Samudra, and brothers Amrozi bin Nurhasyim and Ali Ghufron, known as Mukhlas - for playing major roles on the ground in the operation.
Several others have been jailed, including bomb maker Ali Imron, who was given a life sentence for helping build and deliver bombs.
The only suspect yet to be tried is Riduan Isamuddin, known as Hambali, who allegedly helped orchestrate the attacks and has been detained at the US naval base at Guantanamo Bay since 2006, accused of having financial links to al-Qaeda.