Five suspected Islamic militants have been sentenced to death by an Indian court for bomb attacks on seven Mumbai commuter trains nine years ago.

Seven others were given life in prison over the blasts in July 2006, in which 188 people were killed and more than 800 others injured.

Judge YD Shinde, who convicted them earlier this month of murder and a criminal conspiracy to wage war against the government, announced the sentences in Mumbai.

Seven bombs exploded during a 10-minute span during the evening rush-hour in Mumbai, the financial and entertainment capital of India.

Prosecutors said the attack was hatched by Pakistan's Directorate of Inter-Services Intelligence and carried out by Lashkar-e-Taiba operatives with help from the Students' Islamic Movement of India, a banned militant organisation. Pakistan has denied the charges.

A defence lawyer said he would appeal over the court verdict.

The trial in India's notoriously slow justice system lasted more than seven years. One person was acquitted due to lack of evidence.

Lashkar-e-Taiba is a Pakistan-based Islamic militant group.

The 12 convicted men were believed to belong to the Indian militant group.

KP Raghuvanshi, a police officer who investigated the case, said one Pakistani suspect was killed in the blasts and another was shot dead by Indian police. But there was no independent confirmation of his claim.

India accuses Pakistan of arming and training Islamic insurgents, a charge Pakistan denies.

The neighbouring countries have fought three wars, two of them over control of disputed Kashmir, since their independence from Britain in 1947 and have been engaged in a fitful peace process in recent years.