WASHINGTON — Two Yemeni men were charged in the United States with working with al-Qaida and conspiring to attack U.S. military forces in Afghanistan in 2008, according to a complaint unsealed Tuesday.

Saddiq Al-Abbadi and Ali Alvi were arrested in Saudi Arabia and expelled to the United States, the U.S. Justice Department said. The country has no formal extradition treaty with the United States, according to a list on the State Department website.

Alvi appeared in a federal court in Brooklyn on Sunday and Al-Abbadi was scheduled to be arraigned Tuesday afternoon.

The men traveled in March 2008 to Pakistan to train and fight with al-Qaida, prosecutors said in the complaint, which was filed under seal in April 2009.

Later that spring and summer, Al-Abbadi led two attacks on U.S. troops in Afghanistan’s Paktia province during which a U.S. Army Ranger was killed, they said. Alvi served as an armed scout and lookout during attacks on U.S. military positions in neighboring Paktika province, according to documents filed in the Brooklyn court.

“They were recently expelled lawfully by Saudi Arabia and taken into FBI custody based upon the criminal charges and arrest warrants filed against them,” Justice Department spokesman Marc Raimondi said.

The pair also helped Bryant Neal Vinas, a Long Island man who pleaded guilty in 2009 to helping al-Qaida plan an attack on the Long Island Rail Road, join al-Qaida, according to the court documents.

It describes the Yemenis as working their connections to gain admission for Vinas to al-Qaida in Pakistan.

Lawyers for Vinas and Alvi did not immediately respond to requests for comment. A lawyer for Al-Abbadi could not immediately be reached.

Vinas, who pleaded guilty to conspiring to murder Americans abroad, providing material support to al-Qaida, and receiving military-type training from the group, told prosecutors of training in Pakistan’s tribal areas in a basic weapons course and advancing to explosives and projectile weapons training, according to the complaint.

The complaint also alleges that a second confidential source who traveled from Saudi Arabia to Iran and then to Pakistan corroborated information about the two Yemeni defendants.