The film opens with Lieutenant Eugene Irwin's monologue about the concept of a castle,
mentioning characteristics such as location, defense, garrison, and a flag that can raise
at the top. However, the castle where the story begins is actually a high-security military prison
under the command of Colonel Ed Winter. Lieutenant Irwin was sentenced to 10 years in prison,
transferred the same day of his trial. In his office, Winter mentions how Irwin should
be honored rather than transferred to the prison. Despite his admiration, Winter reluctantly agrees
to house the new prisoner. The lieutenant arrives to be received by all the inmates who heard the
news of his imprisonment. The inmates bet on how long the lieutenant will last in prison, with some
men considering this inhumane. Lieutenant Irwin has all of his belongings confiscated during his
check-in, except for his family photos and Academy ring. Irwin is greeted by Winter,
who shows excellent courtesy and admiration. He then asks him the same question he asks all
convicts upon arrival, about what does he expect from his stay at the prison? But the lieutenant
only answers that he hopes to serve his sentence and return home, nothing else. As Winter reaches
for a book for the lieutenant to sign, Captain Peretz shows Winter's war collection to the
lieutenant, who claims that a person with such a collection has never set foot on a battlefield.
Hearing this from a distance, Winter is discouraged and puts the book aside, so as
his admiration. In the cells, Irwin witnesses the inmates' bedtime, agitated and rowdy, receiving
insults and threats from many of the cells. The next day there’s a brawl in the basketball area,
where an inmate confronts Thumper, a large, build man. As soon as they begin to fight,
inmate Sam Yates begins his job as a bookie among the prisoners to decide who wins.
Irwin watches curiously as all forms of security seem not to care about the fight between the
prisoners, but just as Thumper gets a helping hand in the fight, Winter sounds the alarm,
causing everyone to take cover by lying on the floor. The only one standing is Thumper, who is
shot from a distance by one of the guards. Moments later, Irwin witnesses the abuse of Beaupre, a
prisoner with a bad temper, toward Ramon Aguilar, a stuttering prisoner of few lights during the
construction of some kind of rock wall for Winter. At lunchtime, Irwin meets Dr. Lee Barnard,
an old doctor who served under him in the Gulf and is there for possession of hashish. There Thumper
appears revealing that the bullet that hit him was made of rubber. Thumper's former opponent appears,
claiming their fight was Winter's manipulation by only giving them a basketball that day. They tell
Irwin that those kinds of events are not new, as they are actually common and have caused havoc,
serious injuries, and deaths among the inmates. Far from helping, Irwin tells them that that
place is not so different from a war zone, and all he hopes for is to serve his sentence in peace.
In his cell, Irwin is visited by Yates, who introduces himself as a former officer, a
helicopter pilot whose father fought with Irwin in Hanoi. After that, Irwin is late for his visiting
hours, where he is visited by his daughter Rosalie. The two have a raw conversation, where
she brings Irwin's absence as a father during her youth and that he shouldn’t expect her to
forgive everything so quickly. Still, she wishes him well, and they agree to write to each other.
In the yard, Irwin meets Aguilar, who greets him emotionally. Irwin asks him why he is there,
and Aguilar confesses that he was a former Marine corporal, but he must now remain there because of
a bad mistake he made. Still, Irwin cheers him up happily. From his office, Winter sees the salutes
between Irwin and Aguilar, going against the rule of no longer treating each other as soldiers,
so he asks Peretz to reprimand Aguilar, making him hold his salute in the freezing rain. This
angers Irwin, who tells Aguilar that he shouldn’t keep doing it and that he can lower his hand.
This draws the attention of Peretz, who forces Aguilar to keep his hand raised.
At the confrontation, several guards beat Irwin, leaving him on the floor.
After a brief conversation with Winter, it is decided to punish Irwin for interfering with
Peretz in the reprimand, so the next day Irwin is sent to haul rocks under the sun. The convicts
place their bets with Yates, and Barnard tries to help Irwin the best he can, telling him he can at
least take off his shirt. In doing so, Irwin reveals a series of scars on his back, some of
them are marks from electric shocks due tortures, a consequence of his war days. Hours pass,
and Irwin is still at work, with the convicts encouraging him. Just as he is carrying the
last rock, Beaupre causes him to stumble, hitting his head on the rock itself. Still, he manages to
complete his task, but Peretz says that he has to restack the pile of rocks again. When the outside
time is over, Irwin is moved to solitary confinement. There he’s visited by Winter,
who claims that the punishment was to teach the inmates a lesson. He also says that whenever he
has doubts, just looking at the inmates' records is enough to remind him why those men are there.
Upon returning to his cell, all the inmates greet Irwin by ringing their cells as a sign of respect.
Yates appears in the cell, giving Irwin a haul of cigarettes he won on a bet thanks to Aguilar,
who bet on Irwin's behalf. Irwin calls Aguilar, telling him to take the cigarettes with him,
as he doesn't smoke. Now Irwin asks Yates if there’s a recurring bet on his suicide, and Yates
confirms it. Yates remarks that his father used to tell him how Irwin kept his men alive in Hanoi,
but Irwin confesses that he broke down that one time, and the screams of his men kept him up.
Back at the camp, Irwin tells the prisoners not to be intimidated by the project of erecting the
rock wall. After that, the prisoners decide to tear down the barrier. When Winter asks
who knocked down the wall, a guard tells him that the prisoners were motivated by Irwin in doing it.
They all start to build the wall again, and thanks to the fact that Aguilar's father was
a construction worker, they now have a good orientation on how to proceed correctly. The
project progresses, creating a better wall than the previous one with 18 layers in just one week,
having all the prisoners working together, seeing Irwin as a leader figure. In addition, for his
merits in the construction, they let Aguilar carve his name on one of the rocks as a memento. Winter
understands that this new camaraderie among the prisoners is a strategy by Irwin to build an army,
even creating a code among prisoners to refer to other soldiers under cover titles and thus
go unnoticed. Winter calls Irwin to his office and boasts that there have been fewer incidents
of escapes and acts of rebellion under his tenure, fearing that the former lieutenant may think of a
change in that record thanks to his fulsome wall. That's when Winter sends a bulldozer to tear it
down the wall and destroy the prisoners' morale, but Aguilar gets in the way of the vehicle,
stopping in its tracks. The alarm sounds, and everyone goes to the ground except Aguilar,
who remains upright. Winter gives an order in the face of refusal, and a rubber bullet hits
Aguilar's head, a fatal wound. In a rage, Irwin appoints former Sergeant Major Dellwo to order the
prisoners to line up, treating them like soldiers. They all do as requested to hear Irwin's parting
words to the late Aguilar. Winter interrupts them with an early alarm to eat, and they all break
ranks with a military-like salute gesture. In his cell, Irwin is visited by Winter, who feigns
grief over the loss of Aguilar, but Irwin doesn't believe him at all and tells that it will take
more than that to break them. He also mentions that he and the other inmates want his resignation
as he is a disgrace to the uniform. After offering him a trip to the hole, Winter leaves in defeat.
Brigadier General Jim Wheeler visits Irwin as a friend, requested by Winter to talk to Irwin to
corroborate the stories about his improvised army. In parallel, Winter receives a letter from Irwin,
saying that they are prepared to kidnap Wheeler if he doesn’t resign by 12:10 that day.
Wheeler tells Irwin that he has already exonerated Winter three times, so he has more
power than Irwin as a prisoner. Winter initiates a pre-riot operation to protect General Wheeler,
but it ends up more over the top than it should be, attacking the inmates with a water cannon
and almost throwing gas bombs at them. In the end, Winter understands that it was just a blockade on
Irwin's part and orders finishing the operation. Wheeler scolds Winter, considering it absurd that
an inmate could kidnap him. He tells Winter that if he wants him to, he will move Irwin to another
prison, but Winter refuses the offer out of pride. It is then that Winter goes to the cells and
reveals why Irwin is behind bars. Lieutenant Eugene Irwin violated a presidential order,
sending troops on a mission to Burundi that resulted in the execution of eight soldiers.
Winter proves that they cannot trust Irwin's pride and that the consequences will be bitter
for them if they do. As punishment, those convicts who colluded with Irwin are booked and isolated.
Irwin reveals that the bluffing letter was to understand how the riot squad works and thus
prepare for the next assault. Winter calls Yates privately, as he knows of his run-ins with Irwin.
He tries to make a deal, reducing his sentence to join the 'crusade' Irwin is forming. At lunchtime,
two of Irwin's colleagues fake a fight, with the guards taking them out of the mess hall,
so the inmates can be alone to prepare their strategy. Irwin proposes Winter
violating the Uniform Code of Military Justice by losing control of the facility.
They all agree, and Irwin begins to train them for the attack, consisting of avoiding barricades,
guards, helicopters, and finally, raising the flag upside down in front of General Wheeler, showing
him that Winter is no longer fit to command. After this, Irwin decides to talk to Yates,
revealing that he already knows about his deal with Winter. He accuses him of not being a true
soldier like his father and questions whether his betrayal is worth it. Yates visits Winter
immediately, telling him that he won't survive in prison for long since they know he's the snitch.
Winter denies Yates' request but promises to isolate him from the others for protection.
One of the inmates bursts into the conversation, calling Yates a 'rat.' Fearfully, Yates asks
Winter again for his release and if necessary, he will bring more information for the next morning.
Irwin receives a letter from Rosalie in his cell, which includes a recent photo of her grandson,
whom he has not been able to meet in person. Winter calls Yates again in the early morning
and asks him for more information about Irwin's plan. The latter tells him that the goal is to
raise the flag upside down as a sign of distress, and to Winter's surprise, the flag they will raise
is his own, taken by Yates in their earlier encounter during the prisoner's interruption.
This earns Yates a pass straight to the hole for his double-betrayal. A chaotic inspection of the
guards begins, trying to find the missing flag. All the inmates gather in the central courtyard,
but Winter realizes this is just what they want, so he sends all the guards outside, only to find
that the exits have been blocked. During the encounter, several inmates are injured with rubber
bullets. The few outside guards are restrained, and everyone release the isolated inmates,
including Yates, who join the cause. Some of them manage to call General Wheeler, informing him of
the raid, and with the help of materials sheltered inside the rock wall, they begin a counterattack.
Irwin communicates via walkie-talkie with Winter, openly expressing his intentions to take over the
prison. The prisoners pull out a catapult they built, which will be protected by several other
prisoners using trays as shields. Winter deploys his antiriot unit, engaging the rebels head-on.
The catapult manages to make a full impact, destroying part of Winter’s office and setting
it on fire. When Winter inspects the stone thrown at him, he realizes that it is the same one from
the wall where Aguilar marked his name. As the water cannon arrives, Beaupre decides to
engage the guards on the run, but the inmates manage to cut off the vehicle's water supply,
leaving the way open to fight the guards. Winter receives a call from General Wheeler announcing
their arrival, and decides to call in the reinforcement helicopter. With the help of
the now-acquired anti-riot vehicle, the inmates turn the water supply back on and manage to press
the helicopter so that Yates manages to get on it and fly it. However, the chain breaks,
and Yates dangles from the helicopter. Still, he manages to slowly climb up to take control.
Yates decides to confront the rubber-bullet shooting guard who killed Aguilar,
who thinks it's time to switch to real bullets. Despite taking direct hits, Yates stays in the
air and sacrifices the helicopter's tail to take out the gun turret, killing the guard on the spot.
This act causes Yates to lose control and ends with the aircraft impacting the ground and
rolling with him still inside. Irwin runs to save Yates just in time before the helicopter explodes.
The battle concludes, and the inmates line up in military ranks to greet an angry Winter. He has
them surrounded by shooters and orders the inmates to get down on the ground or else they will open
fire. No one listens until Irwin orders them to do so, all except Irwin himself, who refuses
Winter's request to give him his flag. Instead, he marches to raise it upside down. Winter,
filled with anger, orders to open fire, but all the shooters choose to disobey him. Winter looks
for support, but Peretz orders everyone to remain in place. Tired of such insubordination, Winter
himself shoots Irwin before raising the flag. Peretz confiscates Winter's gun and handcuffs
him. Although Dr. Barnard tries to help him, it’s not enough to stop the bleeding. Everyone then
realizes that Irwin raised the flag correctly, so they proceed to salute in his honor. Although all
was already concluded, Wheeler's group arrives to stop the mutiny. The film closes with a tribute to
the fallen comrades at the rock wall, including the names of Ramon Aguilar and Eugene R. Irwin.