The man, a 45-year-old Ukrainian, was seized by special security forces as the Turkish aircraft, a Pegasus Airlines Boeing 737-800 with 110 passengers, was being evacuated at Sabiha Gokcen Airport, according to Huseyin Avni Mutlu, the governor of Istanbul.
The government scrambled two F-16 warplanes, which escorted the jetliner as it landed, reflecting the heightened fears of terrorism as the Sochi Olympics got underway.
A passenger, Mehmet Tutar, said the pilot even announced that they had arrived in Sochi.
"I didn't even see him," said Tutar, who was seated in the back of the plane, referring to the hijacker. "I just heard something. I thought it was a drunk guy."
Passengers' relatives and friends who went to Sabiha Gokcen, on the Asian side of Istanbul, described tense cellphone conversations with those on the plane.
"We came here early to pick up my father's wife," said Firat Altan, 19. "She was very anxious when I talked to her on the phone, and said the hijacker could not be persuaded by the crew and yelled that he had a bomb on board. I heard some passengers crying in the background."
Mufit Goren, who was waiting for two female friends on board, said they told him, "The hijacker constantly threatened to detonate a bomb with his mobile if anyone neared him, and said he wanted to go to Sochi. He could freely walk along the aisles even when Turkish channels reported that he was taken under control by the security forces."
Passengers were reachable on their telephones for nearly four hours until the security units entered the aircraft. Traffic to and from the airport was halted until the authorities announced that the plane had been secured and the Ukrainian passenger was in custody.
"In the beginning he was thinking that he was going to Sochi," Mutlu said. "Of course, sometime later, he realized that he was in Istanbul, in Turkey. It would not have been good to tell him right away."
The hijacker agreed to the evacuation of children, women and older passengers, and once the evacuation started, other passengers were also helped out of the plane, leaving the hijacker alone with the crew, the governor said. The security forces then entered the aircraft and subdued the hijacker "in a swift, quick and effective manner."
Mutlu said the hijacker, who was not immediately identified, had a suitcase with electronic equipment but no bomb. He was not drunk but might have taken some sort of medication to remain alert, Mutlu added.
The hijacker's possible organizational links and motives were yet to be investigated, Mutlu said, telling reporters that the man had refused to cooperate with the authorities.
Turkish news reports said the man was taken to the Istanbul Security Headquarters, as television footage showed the plane parked with fire brigades and ambulances surrounding it. Habib Soluk, a Transportation Ministry official, was quoted on Turkish television saying the pilots had darkened the cabin lights to reinforce their claim that the plane was in Sochi.
As it happened, the Turkish prime minister, Recep Tayyip Erdogan, was in Sochi to attend the opening ceremony of the Games.
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections. Election results will be out on May 23.