An envoy from Qatar who authorities said grabbed a surreptitious smoke in a jetliner's bathroom and then joked about lighting his shoe on fire, sparking a bomb scare and the scrambling of military jets, has been released from custody.

LANDING ELSEWHERE LANDING ELSEWHERE WASHINGTON (AP)  A Qatari diplomat was on his way to an official visit with an imprisoned al-Qaeda sleeper agent when he touched off a bomb scare by slipping into an airline bathroom for a smoke, officials said Thursday as the diplomat prepared to leave the U.S. The diplomat, Mohammed Al-Madadi was going to meet Ali Al-Marri in prison, according to a State Department official and another person close to the matter. Al-Marri, a citizen of Qatar, is serving eight years in prison after pleading guilty last year to conspiring to support terrorism. Al-Marri was arrested after the Sept. 11, 2001, terrorist attacks, accused of being a sleeper agent researching poisonous gasses and plotting a cyberattack. DIVERTED FLIGHTS: Security alerts push more flights off course in 2010 Consular officials frequently visit foreigners held in the United States to make sure they are being treated well. The purpose of his visit raises further questions about Al-Madadi's behavior, such as why someone familiar with terrorism cases would apparently flaunt airline security rules. Law enforcement officials said Al-Madadi later joked that he had been trying to light his shoe — an apparent reference to the 2001 so-called shoe bomber, Richard Reid. The people who discussed the case did so on condition of anonymity because they were not authorized to discuss the matter. No explosives were found on the plane and authorities said they don't think Al-Madadi was trying to hurt anyone during Wednesday's scare. He enjoys diplomatic immunity from U.S. prosecution and will not be criminally charged, authorities said. The State Department official said Qatar had not yet informed the administration how it will handle the case but has assured the U.S. that Al-Madadi will leave the country. U.S. officials expect that to happen later Thursday or Friday. "We fully expect this will be resolved very quickly," State Department spokesman P.J. Crowley told reporters. Crowley said the U.S. government is satisfied that the Qatari government is taking the matter seriously. Wednesday's scare came three months after the attempted terror attack on Christmas when a Nigerian man allegedly tried to blow up a Detroit-bound airliner. Umar Farouk Abdulmutallab went to the bathroom just before he allegedly tried to ignite a bomb in his seat. Since then, law enforcement, flight crews and passengers have been on high alert for suspicious activity on airplanes. That scare exposed major holes in the country's national security and prompted immediate changes in terror-screening policies. Some air travelers at Denver International Airport Thursday were amazed that Al-Madadi would not be charged with anything. "I think it's wrong. I'd get busted. I don't think that (immunity) should be a factor," said one of them, Hank DePetro, a retired psychologist from Greeley, Colo. Under international protocol — the 1961 Vienna Conventions on Diplomatic Relations — diplomats in foreign countries enjoy broad immunity from prosecution. That immunity can only be waived by a diplomat's home government, something that is rarely requested and even more rarely granted. But even without charges being pressed against him and without such a waiver, the U.S. could have moved to declare Al-Madadi "persona non grata" and expel him from the country. However, officials said they would not pursue this, given the close nature of U.S.-Qatari ties and the importance the country plays in the Middle East. Qatar, about the size of Connecticut and Rhode Island combined and with a population of about 1.4 million people, is an oil-rich Middle East nation and key U.S. ally. It is situated on the Arabian peninsula, surrounded on three sides by the Persian Gulf and to the south by Saudi Arabia. The country hosts the forward headquarters of the U.S. Central Command, which runs the wars in both Afghanistan and Iraq, and is a major supporter of operations deemed critical to both campaigns. Qatar's ambassador to the United States, Ali Bin Fahad Al-Hajri, cautioned against a rush to judgment. "This diplomat was traveling to Denver on official embassy business on my instructions, and he was certainly not engaged in any threatening activity," he said in a statement. "The facts will reveal that this was a mistake." Al-Madadi is the embassy's third secretary, a relatively junior position, although diplomatic assignments in Washington are considered plum posts in most countries' diplomatic corps. An online biography on the business networking site LinkedIn shows that a Mohammed Al-Madadi has been in Washington since at least 2007, when he began studying at George Washington University's business school. The job title listed on the site is database administrator at Qatar's Ministry of Foreign Affairs. The Boeing 757 was carrying 157 passengers and six crewmembers, United Airlines spokesman Michael Trevino said. It left Reagan National Airport at 5:19 p.m. ET and landed at Denver International Airport at 7 p.m. MT. Copyright 2010 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed. Guidelines: You share in the USA TODAY community, so please keep your comments smart and civil. Don't attack other readers personally, and keep your language decent. Use the "Report Abuse" button to make a difference. You share in the USA TODAY community, so please keep your comments smart and civil. Don't attack other readers personally, and keep your language decent. Use the "Report Abuse" button to make a difference. Read more