A federal judge rebuffed defense attempts to dismiss the indictment against John Walker Lindh Monday, rejecting arguments the American had a constitutional right to associate with the Taliban and could not get a fair trial anywhere in the country.

"The First Amendment guarantee of freedom of association is not a pass to provide terrorists with resources and services," U.S. District Judge T.S. Ellis III said.

Ellis' decision clears the way for the government to proceed with prosecuting the U.S.-born Taliban soldier on charges he conspired to murder Americans.

While not completely shutting the door on a future change of venue, the judge also rejected Walker's argument that he couldn't get a fair trial anywhere in the United States, especially in a northern Virginia courthouse just nine miles from the site of the Sept. 11 attack on the Pentagon.

Walker was wearing black-framed glasses and his hair has grown out from a crew cut several months ago. He conferred often with his attorneys during several hours of arguments but showed no emotion when the judge handed down the ruling.

Walker's parents, Frank Lindh and Marilyn Walker, sat together behind the defense table.

Ellis said he was confident Virginians could be impartial jurors, but "if I'm not able to seat a fair and impartial jury, we will go somewhere else."

The defense had noted several times in its arguments that the judge in Timothy McVeigh's case had granted a change of venue from Oklahoma City, site of the 1995 federal building bombing, to Denver. Walker's lawyers wanted the judge at the very least to move the trial to the defendant's home state of California.

But Ellis concluded that Walker's case differed from McVeigh's because "this was a national tragedy, not a local one." He added he could not disqualify potential jurors just because they were familiar with the Sept. 11 suicide hijackings.

"One may have to go to planet Pluto to find someone who has not heard or read about this case," Ellis said.

He also rejected defense claims that Walker had immunity from federal prosecution as a captured enemy soldier and that he was unfairly prosecuted because of his Muslim religion.

"There's no evidence the defendant's religious affiliation motivated the prosecutorial decision," the judge ruled.

The defense lawyers had mounted a broad constitutional challenge in seeking to persuade Ellis to dismiss Walker's indictment.

"You can't charge a soldier with murder for simply being a soldier," attorney George Harris said as he argued Walker should have immunity from prosecution.

Government prosecutors countered that they could prove Walker trained at an Al Qaeda camp and joined the Taliban with the intention of harming Americans.

The defense wrongly "seeks to portray the defendant as an honorable soldier on a par with our own servicemen and women," Assistant U.S. Attorney John Davis said.

The defense also argued that Walker had the right to associate with the Taliban under the First Amendment, that he became a soldier simply to help the Taliban defeat its Afghan rivals and he never harmed or intended to harm any Americans.

"The issue is whether under the statutes the government can proceed with guilt by association rather than individual culpability," Harris told the judge.

Davis responded: "The case is not about association, but about acts of violence with groups bent on violence."

Walker is charged with conspiring to murder Americans, providing support to the Al Qaeda and the Taliban and using firearms during crimes of violence.

Walker's lawyers have vigorously denied that he ever was part of Al Qaeda, although the indictment said he personally met Usama bin Laden, leader of the terrorist network, while at a training camp in Afghanistan.

Attorney James Brosnahan accused top U.S. officials of making inflammatory statements that convinced members of the public that Walker is guilty.

He said Walker is a victim of selective prosecution, since he is charged with aiding the Taliban under a law designed to charge corporations with making illegal financial transactions.

The defense also raised concerns the government had repeatedly and unnecessarily identified Walker as a Muslim even though President Bush has implored Americans not to discriminate against Muslims.

Davis, the prosecutor, said the statutes are broad and permit charging someone with a crime who contributed personal services to an illegal organization.

The Associated Press contributed to this report.