A Flushing man with ties to an alleged terrorist conspired to kill US soldiers in Afghanistan after receiving military training from al-Qaida in Pakistan nearly two years ago, a federal prosecutor said Tuesday.

Adis Medunjanin, 25, traveled with others from New York to Pakistan in 2008 with the intent to kill U.S. Service members in Afghanistan, according to US Attorney James Loonam.

Medunjanin reportedly attended the same Queens high school with another terror suspect Najibullah Zazi, who was indicted on Jan. 9 and charged with conspiracy to commit murder in a foreign country and receiving al Qaida training.

Zazi is accused of driving to New York from Denver with a plan to blow up the city's mass transit system.

Loomnam told the judge Tuesday the two cases are connected and the pair would likely be charged together in the future in a superseding indictment.

Medunjanin took police on a high-speed chase on Jan. 7 that ultimately ended in a crash on the Whitestone Expressway.

During the chase, Medunjanin allegedly dialed 911 and shouted in Arabic, "We love death more than you love life."

Medunjanin's lawyer, Robert Gottlieb, reportedly claims his client was interrogated illegally without access to counsel after his arrest earlier this month.

Medunjanin was held over for an appearance on Feb. 25, the same date as Zazi's next appearance.

In addition, Zarein Ahmedzay, who also reportedly has ties to the alleged terrorists, has pleaded not guilty to a single count of making a false statement to law enforecment. The three men are all being held without bail.