DENVER – 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.

No explosives were found on the Washington-to-Denver flight. Authorities speaking on condition of anonymity said they don’t think the envoy was trying to hurt anyone during Wednesday’s scare and he will not be criminally charged.

Qatar’s U.S. ambassador, 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 on his Washington embassy’s Web site. “The facts will reveal that this was a mistake.”

Alison Bradley, a spokeswoman representing the Qatar embassy, said Thursday morning that the diplomat, Mohammed Al-Madadi, had been released by authorities after questioning and was on his way back to Washington. Al-Madadi is the embassy’s third secretary, said Bradley, who works with the public relations firm Brown Lloyd James.

Wednesday’s scare came three months after the attempted terror attack on Christmas Day when a Nigerian man tried to blow up a Detroit-bound airliner. Since then, law enforcement, flight crews and passengers have been on high alert for suspicious activity on airplanes. The scare exposed major holes in the country’s national security and prompted immediate changes in terror-screening policies.

Two law enforcement officials said investigators were told the man was asked about the smell of smoke in the bathroom and he made a joke that he had been trying to light his shoes – an apparent reference to the 2001 so-called “shoe bomber” Richard Reid.

The authorities asked not to be identified because they were not authorized to discuss the ongoing investigation.

Officials said air marshals aboard the flight restrained the man and he was questioned. The plane landed safely as military jets were scrambled.

The envoy was interviewed for several hours, but authorities declined to provide any details about him or his status.

The latest edition of the registry of foreign diplomats working in the United States identifies a man named Mohammed Yaaqob Y.M. Al-Madadi as the third secretary for the Qatari Embassy in Washington. The position is a relatively low-ranking one at any diplomatic post and it was not immediately clear what his responsibilities would be.

A senior State Department official said there would be “consequences, diplomatic and otherwise” if he had committed a crime.

Foreign diplomats have broad immunity from prosecution. The official said if the man’s identity as a Qatari diplomat was confirmed and if it was found that he may have committed a crime, U.S. authorities would have to decide whether to ask Qatar to waive his diplomatic immunity so he could be charged and tried. Qatar could decline, the official said, and the man would likely be expelled from the United States.

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 crew members, United Airlines spokesman Michael Trevino said. It left Reagan National Airport at 5:19 p.m. EDT and landed at Denver International Airport at 7 p.m. MDT.

The flight crew radioed air traffic control to ask that the flight be met on the ground by law enforcement, Trevino said.

Dave Klaversma, 55, of Parker, Colo., said his wife, Laura, was sitting behind the man in the first-class section of the plane. She said she saw him go into the bathroom and that moments later he said something to the flight crew. After that, two U.S. marshals in first class apprehended the man and sat next to him for the remainder of the flight.

Klaversma said his wife told him it all happened very quietly and that “there was no hysteria, no struggle, nothing.”

The Transportation Security Administration confirmed that federal air marshals responded to a passenger “causing a disturbance onboard the aircraft,” but didn’t elaborate.

“Law enforcement and TSA responded to the scene and the passenger is currently being interviewed by law enforcement,” TSA said late Wednesday in a statement. “All steps are being taken to ensure the safety of the traveling public.”

Some passengers said they didn’t notice any disturbance during the flight.

Sixty-one-year-old Scott Smith, of Laramie, Wyo., said he realized something unusual was going on during the approach.

“We came in rather fast, and we were flying low for a long period of time,” Smith, a computer programmer, told reporters by cell phone. “I’ve never seen a jetliner do that. There were no announcements, nothing about your carryon bags or tray tables.”

Once on the ground, Smith said, the pilot eventually announced that “we have a situation here on the plane.”

Passengers say they were kept on the plane for nearly an hour after it landed and then were questioned by officials. Many were still trickling into the baggage area five hours after the plane landed.

Melissa Nitsch of Washington, D.C., said everyone aboard was questioned by the FBI before being released. Agents asked if they’d witnessed anything and for basic personal information.

“Everyone is pretty happy this situation is over,” Nitsch said. “If you have to be stuck in a situation like this, it pretty much went perfectly.”

President Barack Obama was briefed about the incident while on his way to Prague aboard Air Force One, said a White House official, who spoke on the condition of anonymity to discuss an ongoing investigation.

The North American Aerospace Defense Command ordered two F-16 fighter jets from Buckley Air Force Base, not far from the Denver airport, to intercept the airliner. NORAD said the jets reached the plane at 6:45 p.m. MDT and escorted it until it landed at about five minutes later.

Qatar, about the size of Connecticut and Rhode Island combined with a population of about 1.4 million people, is an oil-rich Middle East nation and close U.S. ally. It is situated on the Arabian peninsula and surrounded by 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 major supporter of operations deemed critical to both campaigns. It also played a prime role in the 1991 Gulf War, which drove Saddam Hussein’s Iraq out of Kuwait.