A Chicago man charged in two international terror plots, including the 2008 Mumbai, India, attacks, pleaded guilty Thursday to a dozen counts against him, and now will not face a trial.

David Headley, 49, pleaded guilty in a federal court in Chicago to a dozen federal terrorism charges. Authorities said he scouted out targets for the terrorist attacks in Mumbai in November 2008 that killed more than 160 people, and planned an attack on a Danish newspaper that published cartoons depicting the Prophet Mohammed.

Headley has agreed to cooperate with the government and testify before a grand jury.

He could have faced the death penalty if convicted, but in exchange for his guilty plea and cooperation, the government has taken execution off the table.

However, he will not be sentenced until after the conclusion of his cooperation, the Justice Department said.

Authorities said Headley attended training camps in Pakistan operated by Lashkar-e-Tayyiba and received instructions in 2005 from three members of the group to travel to India to conduct surveillance. The Justice Department said he traveled to India five times leading up to the Mumbai attacks. Six Americans were killed in the attacks.

The United States considers Lashkar-e-Tayyiba a foreign terrorist organization.

Headley also admitted that in early November 2008, a Lashkar-e-Tayyiba member in Karachi, Pakistan, instructed him to scout the Copenhagen and Aarhus offices in Denmark of the Morgenavisen Jyllands-Posten newspaper in preparation for an attack. The newspaper had published controversial cartoons depicting the Prophet Mohammad.

The alleged plan against the Danish newspaper was never carried out.