NEW YORK — A U.S. citizen accused of training with al-Qaida and conspiring to kill Americans abroad appeared in federal court in New York Thursday to face terrorism charges.

Muhanad Mahmoud Al Farekh, who was detained in Pakistan and recently transferred into U.S. custody, was clad in blue jail garb and sporting short brown hair and a long beard as he made a brief court appearance in Brooklyn.

His court-appointed lawyer, Sean Maher, made no request for bail and did not enter a plea on Farekh’s behalf but asked that he be given medical attention while detained.

In a complaint filed in court earlier, prosecutors said Farekh was charged with conspiracy to provide material support to terrorists.

The Justice Department said in a statement that Farekh had been deported from Pakistan to the United States and arrested on a pending warrant that was unsealed Thursday.

The complaint said that Farekh, who was born in Texas, had conspired with others to provide personnel to be used by al-Qaida in support of efforts to kill American citizens and members of the U.S. military abroad.

The document said that in or around 2007, Farekh, a man named Ferid Imam and a third unnamed individual, all of whom were students at the University of Manitoba in Winnipeg, Canada, decided to leave school and travel to tribal areas along Pakistan’s border with Afghanistan to train with al-Qaida.

According to the Justice Department, in September 2008 Ferid Imam also provided military-style training at an al-Qaida camp in Pakistan to Najibullah Zazi and two other men later convicted of plotting a suicide bombing of the New York City subway system.

The complaint says two cooperating witnesses who provided U.S. investigators with evidence against Farekh had been involved in the subway attack plot.

The document said that before leaving for Pakistan, Farekh and his alleged co-conspirators frequently viewed videos promoting violent jihad, including online lectures by Anwar Al-Awlaki, the U.S.-born, Yemen-based militant preacher affiliated with al-Qaida in the Arabian Peninsula who was killed in a U.S. drone attack in 2011.

Karen Greenberg, a Fordham University counterterrorism expert, said this is one of the first U.S. cases recently involving al-Qaida’s Pakistan-based core group, with most others involving suspects allegedly connected to Syria-based Islamic State militants.

A federal law enforcement official said that in the last two years, the U.S. Justice Department’s National Security division has filed criminal charges against more than 30 individuals — most of them U.S. citizens or residents — for providing support to terrorists.

In a separate case, also in New York Thursday, two women were arrested in an alleged conspiracy to build a bomb and wage a “terrorist attack” in the U.S.

A federal criminal complaint said the women, both U.S. citizens and alleged al-Qaida and Islamic State sympathizers, devised a plot to target police, government or military targets based on their “violent jihadi beliefs.”