Less than a month after the highly anticipated “Top Gun: Maverick” flies into theaters, director Joseph Kosinski is reuniting with star Miles Teller for the Netflix sci-fi thriller “Spiderhead.”

Based on the George Saunders short story “Escape From Spiderhead,” which was originally published in The New Yorker, “Spiderhead” stars Teller as a prisoner at the titular state-of-the-art penitentiary, designed by inventor Steve Abnesti (Chris Hemsworth). Located on a gorgeous island, the island offers its prisoners reduced prison sentences and good accommodations at a price; every inmate wears a surgically attached experimental device that administers mind-altering drugs in their brain.

Although Abnesti is convinced that his work will save lives, the experiments he carries out on his patients begins to test the boundaries of free will. When two subjects, Steve (Teller) and Lizzy (Jurnee Smollett) form a romantic connection, the two begin to rebel against him and his attempts to program them. The trailer shows tense action scenes throughout the complex, laced with several moments of humor.

“Beautiful people get away with too much,” Hemsworth says during a scene in the film. “I say that having benefited myself from time to time.”

Kosinski directs a script written by Rhett Reese and Paul Wernick, who are best known for writing “Zombieland” and the “Deadpool” film franchise. The two also produce the film, along with Hemsworth, Eric Newman, Agnes Chu, Geneva Wasserman, Tommy Harper and Jeremy Steckler. Condé Nast Entertainment, Screen Arcade and The New Yorker Studios co-produced the film for Netflix.

“Spiderhead” will be Kosinski’s fifth film as director. Previously, he was best known for his directorial debut “Tron: Legacy,” released in 2010, as well as his 2013 Tom Cruise film “Oblivion.” Kosinski will reunite with Cruise for “Top Gun: Maverick” which also stars Teller along with Jennifer Connelly, Jon Hamm, Glen Powell, Lewis Pullman, Ed Harris and Val Kilmer. The movie will release in theaters May 27.

“Spiderhead” will premiere on Netflix June 17. Watch the full trailer below.