Updated

Two Chicago men are charged with planning terrorist acts against overseas targets, including a Danish newspaper that sparked riots in the Muslim world when it published cartoons depicting the Prophet Muhammad, prosecutors said Tuesday.

David Coleman Headley, 49, and Tahawwur Hussain Rana, 48, were charged in separate complaints filed Tuesday in U.S. District Court in Chicago. Headley told FBI agents that the initial plan called for an attack against the newspaper building in Copenhagen, but he later proposed just killing the paper's cartoonist and former cultural editor, according to an FBI affidavit released Tuesday.

The charges were unsealed nine days after the FBI's Joint Terrorism Task Force conducted a massive raid on an Islamic butcher shop in the tiny rural town of Kinsman, Ill., that left residents stunned. The halal butcher is one of a few businesses owned by Rana.

Prosecutors say Headley traveled to Denmark twice this year to identify potential targets for a terrorist attack, and that Rana helped arrange Headley's travel, concealing the true nature of his trips.

Headley, who changed his name from Daood Gilani in 2006, is charged with conspiracy to commit terrorist acts involving murder and maiming outside the United States, and could face life in prison if convicted.

He and Rana are both charged with plotting to provide material support to a foreign terrorism conspiracy, a charge that could net Rana 15 years in prison. Headley is a U.S. citizen; Rana is a native of Pakistan and a citizen of Canada, though he resides primarily in Chicago.

Headley was arrested Oct. 3 at Chicago's O'Hare International Airport on his way to Pakistan — where federal officials charge he was planning to meet with representatives of the Pakistan-based terrorist groups Lakshar-e-Taiba and Harakat ul-Jihad Islami (HUJI), a group tied to Al Qaeda.

He told FBI agents following his arrest that he received training from Lakshar-e-Taiba while in Pakistan and had worked with Ilyas Kashmiri, a local chief of HUJI.

On Oct. 18, two weeks after Headley's arrest, the Joint Terrorism Task Force searched four locations in Illinois and arrested Rana at his home in Chicago. The JTTF also searched Headley's home and Rana's immigration business in Chicago, as well as the halal butcher operation Rana owns in Kinsman.

Prosecutors charge that Headley has "corresponded extensively" in coded communications with Pakistani terrorists regarding what he called the "Mickey Mouse Project" — planned attacks on the Danish newspaper, Jyllands-Posten, and its employees.

The Danish Security and Intelligence Service, or PET, said it and the FBI worked together to thwart the plot and that an attack was not imminent.

"PET and the FBI assess that the arrests and the uncovering of the terrorist plans have reduced the risk of an attack. PET and the American authorities however are continuing their intensive investigation in order to mitigate this threat," said agency head Jakob Scharf.

Headley's attorney, John Theis, said he had no comment. Rana's attorney, Patrick Blegen, said that his client "is a well respected businessman in the Chicagoland community."

"He adamantly denies the charges and eagerly awaits his opportunity to contest them in court and to clear his and his family's name," Blegen said. "We would ask that the community respect the fact that these are merely allegations and not proof."

When federal agents arrested Headley on Oct. 3, they found a memory stick with 10 short videos of sites in Denmark, including the two offices of Jyllands-Posten, the inside and outside of Copenhagen's central train station and a nearby military barracks, according to their affidavit.

Officials charge that Rana purchased plane tickets for Headley's frequent travels around Europe and Pakistan over the past year, helped him engage in e-mail contact to further his plans and employed Headley in what may have been a cover operation, as Headley appears to have done little or no actual work for Rana's immigration business.

E-mails between Headley and a member of Lakshar-e-Taiba show that the terrorist group also asked him to visit India to help plan an attack there, the complaint says. Lakshar-e-Taiba was responsible for the 2008 attacks in Mumbai that killed more than 170 people.

Federal prosecutors said there was no imminent danger in the Chicago area, but the charges underscore the continuing threat of terrorism on U.S. soil and overseas.

"This case is a reminder that the threat posed by international terrorist organizations is global in nature and requires constant vigilance at home and abroad," said David Kris, assistant attorney general for National Security.

The cartoons that prosecutors say inflamed Headley appeared in the Jyllands-Posten newspaper in 2005. The 12 cartoons depicting the Prophet Muhammad triggered widespread protests throughout the Islamic world and threats from extremist groups. Headley wrote online that the images "disposed him toward violence," the complaint alleges.

One cartoon showed Muhammad wearing a bomb-shaped turban. Any depiction of the prophet, even a favorable one, is frowned on by Islamic law as likely to lead to idolatry.

The Associated Press contributed to this report.