ISTANBUL — Turkey scrambled an F-16 jet Friday to force down an airliner from Ukraine when a would-be hijacker on board ordered it to Sochi where the Winter Olympic opening ceremony was underway, Turkish officials said.

Turkish media reported that a Ukrainian man brandishing a detonator tried to gain access to the cockpit of the aircraft operated by Turkey’s Pegasus Airlines while it was in the air.

He was overpowered by security forces when the Boeing 737-800 airliner landed at Istanbul’s Sabiha Gokcen airport at 6:05 pm local time. He was taken to an undisclosed location for questioning.

“A Pegasus Airlines plane with 110 people on board had to land at Sabiha Gokcen airport because of a passenger who threatened passengers with a bomb,” said Habib Soluk, deputy Turkish transport minister.

“We are sure that he didn’t enter the cockpit. We know that the aircraft was hijacked before it entered Turkish airspace,” he said.

The aircraft departed from Kharkov, Ukraine for the scheduled flight south over the Black Sea to Sabiha Gokcen. The hijacker wanted to divert it east to Sochi, the Russian city on the Black Sea coast.

When the man tried unsuccessfully to get in the cockpit, the pilot emitted a hijack alert and the Turkish F-16 military jet was scrambled.

The plane was immediately stormed by Turkish anti-terrorism commandos after it landed and the man seized, reports said.

Turkish officials are yet to confirm whether explosives were found on board.

Turkish television channels showed images of the aircraft surrounded by ambulances, fire engines and police vehicles with flashing lights.

They showed a still image of the would-be hijacker, in his 30s or 40s, with short hair and wearing what looked like a red-white-and-blue ice hockey shirt with the number 11.

All of the passengers were evacuated and the governor of Istanbul posted on Twitter just after 10 p.m. local time that “the operation has ended.

Huseyin Avni Mutlu said the evacuations from the plane occurred “without any problems.”

High security around Sochi

The incident happened just as the opening ceremony for the $50-billion Sochi Olympic Games — with 40 heads of state and leaders including UN Secretary General Ban Ki-moon and Chinese President Xi Jinping attending — was underway.

Security concerns were already heightened after the United States announced a temporary ban on liquids and gels in hand luggage on Russia-bound flights, following a warning that militants could stuff explosives into toothpaste tubes.

Russia last month banned domestic travelers from having any liquids and gels, including toothpaste, in their carry-on luggage ahead of the Games, which run until February 23.

Russian President Vladimir Putin is under huge pressure to organise a glitch-free Games after a build-up dogged by controversies over gay rights, construction delays and security.

Concerns over militant attacks skyrocketed after two suicide attacks killed 34 in the southern Russian city of Volgograd in December. They were blamed on extremist militants from the Northern Caucasus region.

Russian security forces are still fighting insurgents in the area, which is close to Sochi, and militants have threatened to strike targets in Russia during the sports event.

About 40,000 members of the Russian security forces are on duty in and around Sochi in one of the tightest operations ever mounted at an Olympics.

Two US warships have deployed to the Black Sea, ready to offer assistance in the case of a security emergency necessitating the evacuation of Americans.

US President Barack Obama said earlier Russia had an “enormous stake” in thwarting “terrorism” at the Games, adding that Washington was doing everything it could to help keep athletes safe.

“I think the Russians have an enormous stake, obviously, in preventing any kind of terrorist act or violence at these venues. They have put a lot of resources into it,” Obama said in an interview with US Olympic television host NBC.