The Nigerian suspected in the attempted attack on a U.S. airliner had stayed on in Yemen illegally after his visa expired three months ago and should have been stopped by authorities from leaving the country, Yemeni security officials said Thursday.

Umar Farouk Abdulmutallab spent time in Yemen on two occasions before the attempted Christmas Day attack on a Detroit-bound Northwest Airlines flight.

Yemeni officials said Abdulmutallab's student visa for Yemen, where he studied Arabic at a local language institute, was valid from Aug. 4 to Sept. 21.

After his visa expired, the 23-year-old stayed on in Yemen until the first week in December, they said, but his whereabouts in the country is unknown.

They added that Yemen's airport authorities and passport control should have prevented Abdulmutallab from departing. The officials spoke on condition of anonymity because they were not authorized to discuss the case with the media, pending the outcome of an investigation.

The probe will look into why the Nigerian wasn't detained, questioned and prohibited from leaving the country, they said.

Administrators at the school where Abdulmutallab studied believed he had left the country in September, they said.

"We arranged a taxi to take him to the airport on Sept. 21 and we said goodbye," school director Muhammad al-Anisi told The Associated Press. "Our responsibility toward him ended that day."

Al-Anisi said no one from the airport security or immigration had subsequently contacted the school to ask about the student's whereabouts.

Yemen has confirmed Abdulmutallab spent two periods in Yemen, from 2004-2005 and from August to December of this year. He was enrolled at the school during both periods to study Arabic.

Al-Qaida in the Arabian Peninsula, an offshoot of Osama bin Laden's group, claimed it was behind the attempt to bomb the Northwest airliner.