India's Supreme Court has upheld the death sentence of a man convicted of aiding an attack on parliament in 2001.
Afzal (left) is sentenced to death but Geelani (right) is acquitted
Mohammad Afzal was sentenced to death by hanging for "waging war against the nation, murder and terrorist activity".
But the death penalty handed down to a second man, Shaukat Hussain, was reduced to 10 years in jail on appeal.
Five gunmen shot dead nine people in the parliament grounds, before being killed. India blamed Pakistan over the attack and the two came close to war.
The BBC's Sanjoy Majumder in Delhi says the court judgement comes as a major setback for India's law enforcement agencies and raises serious questions about the process of gathering evidence in criminal investigations.
The Supreme Court also upheld the acquittals of a Delhi college professor, SAR Geelani, and the wife of Shaukat Hussain, Afsan Guru.
The pair were acquitted due to lack of evidence. He had originally been sentenced to death, and she had been given five years in jail.
Afzal, Hussain and Mr Geelani are all Kashmiri and were arrested in Indian-administered Kashmir the day after the attack.
The court judgement said Afzal had done everything he could "to help the terrorists in their nefarious act".
"Evidence shows beyond reasonable doubt that Afzal was a party to the conspiracy and had a nexus with the deceased terrorists."
December 2001 - four arrested day after gun battle, accused of aiding attackers
December 2002 - three of the four given death sentences, one a prison term
October 2003 - High Court overturns two convictions, upholds two death sentences
Jan 2004 - Supreme Court stays both executions
August 2005 - both acquittals and one death sentence upheld, the other commuted to jail
But the court absolved Hussain of murder.
Defence lawyers said he had been found guilty only of having knowledge of the attack - and not for carrying out or aiding it in any way.
The lawyer for Shaukat Hussain and Ms Guru, Nitya Ramakrishnan, described the verdict as "a very significant achievement for the defence".
She quoted the judges as saying that the evidence against Hussain "was full of holes".
The death sentences handed down to Afzal and Hussain at the trial in December 2002 were the first under India's tough new Prevention of Terrorism Act which has since been scrapped.
The Supreme Court was the last chance for Afzal and Hussain to seek to have their sentences overturned. Hussain also was fined 25,000 rupees ($575).
Afzal can now appeal for clemency to the Indian president. Death sentences are carried out in India, but very rarely.
India blamed the parliament raid on the Jaish-e-Mohammed militant group, which it said was backed by Pakistan.
Pakistan denied involvement. Relations between the two nations deteriorated after the attack.
They mobilised up to a million men along their common border, leading to international concern about a possible war.
Ties have thawed since then and the two nuclear neighbours have been involved in a peace process for the past 18 months.