A Massachusetts man has appeared in a U.S. court on charges that he conspired to launch attacks against shoppers in malls, American politicians and U.S. soldiers in Iraq.

Twenty-seven-year-old Tarek Mehanna was arrested hours earlier at his parents' home in a Boston suburb on Wednesday. He and two other men face charges of conspiring to commit terrorist acts.

Mehanna refused to stand to hear the charges against him during a brief court appearance later in the day. His father then urged him to stand and he eventually obliged, sending his chair clattering to the floor.

From 2001 until May of 2008, prosecutors allege Mehanna had been plotting to "kill, kidnap, maim or injure" U.S. soldiers and two unidentified politicians who used to be members of the executive branch.

One of Mehanna's alleged cohorts, Ahman Abousamra, is now in Syria; the other is co-operating with authorities working on the investigation, prosecutors said. He has not been identified.

Abousamra allegedly tried -- and failed -- to join foreign terrorist groups in Pakistan from 2002 to 2003, according to court documents filed by the U.S. government.

Federal prosecutors claim that Mehanna and the other alleged conspirators attempted to obtain automatic weapons so they could carry out a mall attack, but could not get a hold of the guns they wanted.

Acting U.S. Attorney Michael Loucks said Mehanna allegedly had "multiple conversations about obtaining automatic weapons and randomly shooting people in shopping malls."

Loucks did not indicate which malls had been targeted.

Mehanna's attorney, J.W. Carney Jr., could not immediately be reached for comment.

The accused is a U.S. citizen who was arrested last November, when he was charged with lying to the FBI about the whereabouts of Daniel Maldonado -- a man who is now serving a 10-year prison sentence for training with al Qaeda members to overthrow the Somali government.

Mehanna allegedly told the FBI that Maldonado was working for a website in Egypt. But authorities said Maldonado had called from Somalia, urging Mehanna to join him in "training for jihad."

Authorities said that Mehanna and his co-conspirators had allegedly contacted Maldonado about obtaining automatic weapons for their planned mall attacks.

Mehanna will be held in custody until his next court appearance on Oct. 30.

With files from The Associated Press