David Headley, an American who admitted scouting targets for the 2008 Islamic militant raid on Mumbai and later agreed to testify against the plotters to avoid the death penalty, was sentenced on Thursday to 35 years in prison.

The sentence, handed down by U.S. District Judge Harry Leinenweber, was the maximum sought by federal prosecutors.

The attacks killed more than 160 people, including six Americans. Headley, a 52-year-old U.S. citizen of Pakistani descent, admitted videotaping sites that were targeted by the Mumbai attackers.