Bill Marks (Liam Neeson) sits in his SUV at an airport drinking whiskey and arguing with someone on the phone. He wearily goes to the departure gates, and has a smoke, while eyeing the passengers. A man stands beside him and asks for a light and mentions he is going to Amsterdam, but Bill refuses to make small talk. As his passport is examined, it shows that he's from Belfast. At the X-ray lineup, Marks loses patience with another passenger, Zack White (Nate Parker), who is busy yakking on his cell phone, and brushes past. As he waits to board, he sees a redheaded woman, Jen Summers (Julianne Moore) arguing with a boarding agent because she was guaranteed a window seat but given an aisle seat. Marks helps a young girl, Becca, board the plane. He and White are both a little disconcerted on finding they're seatmates in business class, on British Aquatlantic Flight 10 to London. As she boards, Summers asks anyone in a window seat if they will trade seats with her. White agrees to switch. She sits beside Marks and starts chatting. As Summers takes off her scarf, Marks notices a scar on her upper chest, poking above the V-neck of her shirt. A flight attendant, Nancy (Michelle Dockery) asks the pilot and co-pilot if they'd like anything, and the pilot notices that Nancy and the co-pilot are attracted to each other. As the plane takes off, Marks nervously grips the chair and clutches a blue ribbon, which he tells Summers was given to him by his daughter. She asks about the daughter, and Marks says her name is Olivia and she's 17 now.
Midway over the Atlantic Ocean, Marks is disturbed by a young woman sitting behind him, accidentally kicking the back of his seat while she makes out with her boyfriend. He goes to the lavatory, puts a strip of tape over its smoke detector, and lights up a cigarette. As he lights up, the camera pans over a gun and a badge that shows he's a Federal Air Marshal.
Returning to his seat, Marks gets text messages on his secure phone. The caller claims to be one of his passengers-- who knows that Marks was smoking in the lavatory. The texter states that someone on the plane will die every 20 minutes unless $150 million is transferred into a specific bank account. Breaking protocol, Marks consults with Jack Hammond (Anson Mount), the other air marshal on the flight. Hammond tells him it is a joke and to forget it; the plane is too crowded for anyone to get away with someone killing a person. Marks reports to the pilot, Captain David McMillan (Linus Roache), showing him the text messages. The copilot says a cross-check of the passenger manifest will take 25 to 30 minutes-- longer than Marks has before the threat of someone being killed. He decides on having the TSA try to backtrace the account number while he watches all the camera feeds from the galley. In ten minutes, the pilot is to switch off the network system so the text messager can't check to see if the money transfer has been made.
Marks goes to the galley and watches the cabin cameras with Nancy and Summers. As he engages the text messager, the women scan for people also texting. There are five or six, and Bill notes the names on the passenger manifest. The last person texting is Hammond.
The galley phone rings; a TSA agent named Marenick (Shea Whigam) has been alerted to what's going on and starts asking Marks questions... but Marks falls silent when the texter asks how Marks' daughter is, typing in her name.
Marks notes Hammond stop texting, and he gets up and goes to the rear. Marks follows. They enter a lavatory and begins arguing, Hammond says he needs the money and offers Marks a cut. When Marks grabs for Hammond's phone, he starts fighting with Marks. He pulls out a gun, but Marks manages to disarm him. The fight is fierce but Marks eventually gets the upper hand, placing Hammond in a reverse headlock. Hammond reaches for the gun on the floor while Marks pleads with him not to do it. Hammond refuses to listen and slowly aims the gun at Bill, forcing him to break Hammond's neck. This occurs exactly at the 20 minute mark, resulting in the first death. Marks closes the door and returns to the flight deck. The texter reveals he knows Marks killed Hammond, and tells Marks to reset his watch. Every twenty minutes another person he's supposed to protect, will die unless the texter gets his money.
Summers gets up and eavesdrops as Marks goes to Captain McMillan, telling him to turn the network back on. McMillan shocks Marks by telling him that TSA has confirmed the bank account number is in Marks' name. Marks lies and says nothing's happened yet. McMillan then says that TSA wants him to relieve Marks of his badge and gun. He tries to read the log of texts on Hammond's phone, but during the fight, it fell into the lavatory sink, and Hammond had kicked the faucet so that the phone became doused with water, rendering it inoperable.
Summers shows Marks a trick she learned to help with wet phones, and notes that it's not Marks' phone. She is worried as to what is going on, saying as a passenger on the flight, she feels she has a right to know. Marks finally makes a stern request for Summers to return to her seat. She's shocked, but complies.
Marks checks the text history for Hammond's phone. The mysterious texter says that Hammond is going to do exactly what the texter tells him to do, because he knows what Hammond is carrying in his briefcase. He tells Hammond to meet him in the back of the plane right away. Marks retrieves Hammond's briefcase, takes it into the rear lavatory, and finds Hammond's key on his body. Inside the briefcase is a very large plastic bag filled with cocaine.
Marks reveals to Nancy that Hammond is dead and tells her everything he knows about what's going on; he understands that the person behind everything wants the people to believe that two air marshals are responsible for it all. Marks asks Nancy for her help.
Marks has the lights turned on and announces to everyone a surprise inspection. He goes to each texter and checks their phones and pats them down. One is an NYPD cop, Reilly (Corey Stoll). Another is an Arabic doctor, Fahim Nasir (Omar Metwally). A third is attorney Charles Wheeler (Frank Deal). Bill then notices the man from the sidewalk at the airport, Tom Bowen (Scoot McNairy). He roughly brings him to the rear galley, demanding to know why he lied about Amsterdam.
Marenick calls and demands that Marks stop what he's doing. When Marks demands a background check on Bowen, Marenick says Bowen is a schoolteacher with family in London and is clean. Marenick tells Marks that he's relieved of duty.
Bowen tells Marks that some stranger offered him $100 to tell Marks he was going to Amsterdam. Marks forces Bowen up and down the cabin to make him confirm if the person is on the flight. All the passengers stare in disbelief as Marks binds Bowen's hands with duct tape and puts him in a seat.
Marks notices time is almost up on the 20 minutes. He draws Hammond's gun and watches the cabin. The texter suddenly makes contact and tells Marks that he never said the target was a passenger. Someone rings for the flight attendant and Marks runs toward Nancy.
Suddenly the plane lurches downward. In the cockpit the pilot is having a seizure. Marks hurries to get Dr. Nasir to help, but it is too late. At the 20 minute mark, Captain McMillan dies of poisoning.
The passengers become increasingly scared at Marks' aggressive behavior. Marenick and Co-pilot, Kyle Rice (Jason Butler Harner) become convinced that Marks is hijacking the plane.
As Marks passes by her seat, Summers explains that Zack White is a smartphone programmer. Asking about this, Marks has White design a hack to send from Marks' phone, which will cause the texter's cell phone to ring. White is nervous and unsure, but promises to try. Marks empties business class except for White and Summers, making all the other passengers go into coach and sit down, so nobody can see what White is doing. Without any explanations as to Marks' behavior or actions, the passengers continue to grow more alarmed and upset. Marks glances out a cabin window and notes that the wing's turn flaps are in turning position. Rice confirms that the plane has been diverted north and will land in 55 minutes. He's been ordered not to talk to Marks, but warily gives in to a request for five minutes to find the texter.
The hack White designed is ready. White goes into coach and sits beside Bowen. The passengers are horrified as Marks enters and orders them all to raise their hands above their heads for one minute. It's clear they feel Marks has assumed control of the plane for something terrible. But nobody is ready to resist him and they do what he wants. Summers enters the coach section, also with her hands up. Marks holds up his phone for all to see and sends the hack. Everyone hears the sound of a cell phone ringing. Marks discovers it in Charles Wheeler's pocket. Wheeler desperately claims to have never seen the cell phone before. Forcibly taking him to the front galley, Marks roughs Wheeler up and demands answers, but Wheeler suddenly goes into a seizure and dies.
Reilly talks about the issue with several passengers. When Dr. Nasir admits to them that both Wheeler and Captain McMillan are dead, Reilly and the other passengers are convinced Marks is a killer, and may plan to crash the plane. They start to discuss a plan of action.
Perplexed, and smoking in the forward lavatory, Marks stares at the paper towel dispenser and pulls it open. Behind it, he finds a vent opening that gives a view of the cockpit directly behind the pilot's seat. He also finds a blowpipe in the lavatory trash bin. Searching Wheeler's body, he finds a miniature dart. Questioning a passenger he saw go into the forward lavatory an hour ago, he finds that Summers was waiting for it when the passenger came out.
Marks confronts Summers on this, and finally, exasperated, she explains she went into heart failure and was revived from near death, but her heart muscle was weakened and one day she'll have another episode that will kill her. This is why she has the scar on her chest, and why she always wants a window seat on an airplane: to enjoy the view and live for each moment, knowing it could be her last. Meanwhile, the passengers are all watching their TV screens. International news is covering the incident and explaining a thorough investigation into Marks, including where he parked his car. The report says a hijacking is in progress and Marks is the prime suspect.
While Marks and Summers try to gain access to the texter's cell phone, it suddenly activates, sending automated messages to TSA implying that Marks is suicidal and is going to detonate a bomb on the plane. The phone displays a 30-minute countdown timer.
The news report begins discussing Marks' entire background, including that his daughter died from cancer at eight years old, and that he's not American born. When a person being interviewed talks about how air marshals walk right past security, Marks finds the bomb hidden in the cocaine smuggled by Hammond.
Meanwhile, Reilly convinces some other passengers to help subdue Marks. After a brief but fierce fight, they have Marks pinned to the floor, but Bowen picks up the loose gun and makes the others release him, but demands that Marks explain what's going on. Out of options, Marks finally explains the situation in detail to everyone, admitting that all they've heard about him is true. But he swears he's trying to save the plane. Warily the passengers agree to work with him. Bowen returns Marks' gun and Marks has the tape bindings removed from Bowen.
Marks attempts to initiate a protocol of least damage: by bringing the plane to 8,000 feet to equalize air pressure, placing the bomb in the rear of the plane, covering it with baggage and moving the passengers to the front in order to contain the explosion and minimize casualties. Bill gives Hammond's gun to Reilly, trusting him to help if the hijacker tries a contingency plan. Summers asks if the TSA can wire the money, but Marks starts to think this is not about the money at all, with only a few minutes before the bomb explodes. He feels he wasn't supposed to find it; the person behind everything wants the public to believe that an air marshal took down the plane, for a reason Marks can't figure out yet.
Fighter jets have begun escorting the plane, their pilots ordering Rice not to change course or altitude without permission or they will launch rockets to destroy the plane. Marks then contacts Rice, explaining that the plane needs to descend to 8000 feet for the lowest pressure deferential. Rice knows this is explosives protocol, and Marks admits that a bomb is on the plane, programmed to explode in sixteen minutes. Rice insists he needs ten minutes or else he will lose too much speed to reach the landing zone he's being escorted to.
Marks brings out the bomb and examines it; it's an extremely sophisticated pressure trigger of military design that cannot be disarmed or else discharged out of the plane without exploding. Marks explains to the passengers that he's sure the hijacker doesn't intend to survive the incident. He explains the protocol of least resistance; even though it's never been used, they all have to try it in order to have any hope of survival. Dr. Nasir asks Marks a question he finds puzzling: if the hijacker intends for the bomb to detonate regardless of circumstances, what is he waiting for?
All the plane's luggage is packed against the bomb, which had been placed against the rear of the plane. Rice has all the passengers sit and strap in. Marenick calls Bill and tells him the money has been transferred, and he can stop acting innocent. Marks put the phone on speaker so everyone can hear Marenick saying the money has been transferred, reciting the bank account number and confirmation code. He insists the plane will be shot down if Marks tries to descend the plane to civilian airspace. He tells Marks that nobody believes he's innocent because of "the video--" a passenger uploaded a video to social media, of Marks dragging another passenger around the plane cabin, and it's been playing regularly on a loop all over the news. Marks notices a young man pointing a smartphone at him and asks to see it. As he begins watching the footage, the camera switches to show Bowen looking at Marks intently.
Watching a video clip, continually replaying it in slow motion, Marks notices Bowen stumbling right over Wheeler, in a way that easily would allow him to slip the smartphone into his pocket, and also apply the poisoned dart. Realizing that Bowen is the culprit, Marks advances, gun drawn, but Bowen grabs Reilly, pulls Reilly's gun away and presses it against his head, and pulls the trigger. The gun is empty. Reilly elbows Bowen, but Bowen slips down and out of sight among the seats. Marks tells Reilly to check Marks' own bag, where a spare clip of ammo is... but White has it. He fights Reilly and grabs the empty gun, slipping the clip into it, and Bowen ambushes Marks and stabs him in the hand with a knife, grabbing his gun. White is Bowen's accomplice in the hijacking, and they now have command.
Bowen explains he was appalled by the lack of security at U.S. airports before 9/11, and his father died during the attack. He and White joined the military, hoping for justice, but were disillusioned by what the war turned out to be, and returning home to a country where nothing had changed. Bowen was hoping that framing Marks as a terrorist would lead to drastically increased security. White prepares a parachute, expecting he and Bowen will escape the plane with the money. But Bowen is prepared to die with the plane and shoots White when he's on the verge of giving in to Marks' persuasion to disarm the bomb. Meanwhile, Rice has been insisting to the fighter plane escorts that he needs to descend, but the fighter pilots have their orders and refuse to deviate.
Rice decides to dive the plane to 8000 feet, which causes Bowen to be slammed against the plane ceiling. The gun goes off and shoots out a window. Oxygen masks drop. In the confusion, Bowen tries to shoot Marks. Nancy hits Bowen from behind, but he hits her back and knocks her out. The spare gun starts to bounce off the cabin floor, and Marks grabs it and shoots Bowen in the head. White recovers and attacks Marks with a knife, but Marks knocks him down and rushes to the front of the plane. The bomb detonates, and White dies in the explosion. The packed luggage contains the explosion, which blows a hole in the rear fuselage but doesn't destroy the plane.
Rice manages an emergency crash-landing at a military base in Iceland. The plane is badly damaged in the landing, but there are no casualties, Marks and Summers save Becca from being blown out of her seat. Marenick calls Marks and apologizes, and asks for the money back. Marks is hailed as a hero in the media, and the film ends with him and Summers beginning their friendship/romance.