The Nigerian man accused of trying to blow up a jet over the US on Christmas Day was living in Yemen until earlier this month, Yemeni officials have said.
The foreign ministry said Umar Farouk Abdulmutallab, 23, was in Yemen from August until the beginning of December, the official Saba news agency reported.
He had a visa to study Arabic at an institute in the capital Sanaa.
Earlier, US President Barack Obama said he would not rest until those involved in the attempt were brought to justice.
Mr Obama promised to use "every element of our national power to disrupt, to dismantle and defeat the violent extremists".
A US monitoring group says a regional offshoot of al-Qaeda, based in Yemen, has claimed that it was behind the failed attack.
A web posting by al-Qaeda in the Arabian Peninsula, which included a photograph purportedly of Mr Abdulmutallab in front of its banner, said it had been a response to US attacks against its operatives.
Mr Abdulmutallab has been charged with attempting to blow up the Northwest Airlines Airbus A330 from Amsterdam, which had nearly 300 people on board, as it made its final descent into Detroit on Friday.
The 23-year-old, who is being held at a federal prison in the US state of Michigan, was restrained by passengers and crew while allegedly trying to detonate a high-explosive device sewn inside his underwear.
He has reportedly told FBI investigators that al-Qaeda operatives in Yemen had supplied him with the bomb and that there are others like him who will strike soon. His family says it lost contact with him in October.
On Tuesday, an official at the Yemeni foreign ministry told Saba that the Migration and Passport Authority had confirmed that Mr Abdulmutallab arrived in Yemen at the beginning of August to study at the Sanaa Institute for Arabic Language (SIAL) and left for Ethiopia four months later.
"The entry visa was granted to the Nigerian after authorities found he could get visas from other friendly countries and saw his US visa was still valid," he said.
The security services were now trying to find out who Mr Abdulmutallab had contact with while in Yemen and would co-operate with the US, he added.
"Yemen condemns such terrorist acts targeting the innocent and it reiterates its full support for the fight against terror anywhere."
US officials are said to be concerned there may be more al-Qaeda-trained young men in the country planning to bring down US planes.
ABC News earlier reported that among the group who planned the alleged attack were two men who were released by the US from its Guantanamo Bay detention centre in November 2007.
Mohammed Atiq al-Harbi, also known as Mohammed al-Awfi, and Said Ali al-Shihri were sent home to Saudi Arabia, where they were admitted to an "art therapy rehabilitation program" and later set free, US and Saudi officials said.
Both men appeared in a video in January along with the man described as the leader of al-Qaeda in the Arabian Peninsula, Nasser Abdul Karim al-Wuhayshi.
On Monday, US Homeland Security Secretary Janet Napolitano said that airport security systems had failed, and that a much-criticised earlier remark of hers that security had worked was taken out of context.
She also demanded to know why officials had not revoked Mr Abdulmutallab's two-year multiple-entry visa - which was issued in June 2008 - after his father voiced fears to the US embassy in Abuja that his son was becoming radicalised.
Mr Abdulmutallab's name was added to the Terrorist Identities Datamart Environment (TIDE) watch list, but was not put on a no-fly list.
Online postings apparently written by the young Nigerian between 2005 and 2007 meanwhile suggest the young Nigerian was "lonely" and had "never found a true Muslim friend", according to the Washington Post.
"I have no one to speak too," read one entry by a user named farouk1986 in January 2005, when Mr Abdulmutallab was attending boarding school in Togo.
"No one to consult, no one to support me and I feel depressed and lonely. I do not know what to do. And then I think this loneliness leads me to other problems."