A Chicago man accused of planning a terrorist attack against a Danish newspaper knew in advance about a plot to attack Mumbai and offered congratulations to the killers afterward, federal prosecutors charged Monday.

In papers filed in federal court in Chicago, prosecutors said Tahawwur Hussain Rana learned an attack was about to happen while traveling in Dubai days before the Nov. 26, 2008, attack in India that left 166 people dead.

Rana, a 48-year-old Chicago businessman, is charged with providing material support to terrorists. Prosecutors said after the Mumbai attacks, he told an alleged coconspirator, 49-year-old David Coleman Headley, to pass along his congratulations to the terrorist group for its excellent planning and preparation.

"Rana was told of the attacks before they happened and offered compliments and congratulations to those who carried them out afterwards," Assistant U.S. Attorney Daniel Collins wrote in the court filing.

Rana was arrested Oct. 18 and charged with helping Headley plot an attack on a Danish newspaper that printed 12 cartoons depicting the Prophet Muhammad, sparking outrage in the Muslim world. He has been seeking his release on bond from the Metropolitan Correctional Center.

In their filing, prosecutors said Rana is a flight risk and urged U.S. Magistrate Judge Nan Nolan not to grant his release. A hearing on the matter was scheduled for Tuesday.

Rana's attorney, Patrick Blegen, has portrayed him as an innocent dupe of Headley, saying his client belonged to a study group that believed in the doctrine of nonviolence preached by Mohandas K. Gandhi, the father of Indian independence.

Blegen was not reached immediately for comment. A message was left at his office Monday.

In their filing, prosecutors said Rana received advance word of the Mumbai attacks while Dubai in November 2008, days after arriving in the Persian Gulf city-state from Mumbai. They did not say why Rana was in Mumbai.

During FBI questioning after his arrest, Rana insisted he had no prior knowledge of the Mumbai attacks and claimed his discussion of the other locations was just talk about possible business opportunities.

Federal authorities say those are lies. In their filing, prosecutors alleged that in a secretly recorded conversation in September 2009, Rana and Headley discussed the possible attack in Denmark as well as attacks on Bollywood, the Indian film industry; Somnath, a temple; and Shiv Sena, a political party with strains of Hindu nationalism.

They said Headley and Rana spoke about a meeting between Rana and a man they called "Pasha" days before 10 gunmen rampaged through the Indian city, killing their victims. Prosecutors said Pasha is a retired Pakistani military officer, Abdur Rehman Hashim Syed, who is charged separately with involvement in the plans to attack the Danish newspaper. They said Syed helped put Headley in touch with Ilyas Kashmiri, who has been linked to al-Qaida and described as a leader of the terrorist group Harakat-ul Jihad Islami.

According to prosecutors, Headley told Rana that "Pasha met you in Dubai and told you this was about to happen ..." A moment later in the conversation, Headley specified that he was talking about "Mumbai," according to a transcript included in the court filing.

Travel records show Rana was in Dubai just before the attacks, prosecutors said.

They said that after he was arrested, Rana was asked: "What are you guys talking about there?" in reference to what Pasha had told him in Dubai.

"That thing that happened in uh, uh, India ... um, they were, uh, uh, I think people who hijacked, uh, hotels or something ... (in) Mumbai," the court papers quoted Rana as saying.

Headley was arrested Oct. 3 at O'Hare International Airport as he was about to board a plane for Philadelphia. FBI agents said that at that time, Headley readily admitted his role in the planned Danish attack. His attorneys have declined to comment.