With Rottmayer's help, they get sent to solitary again and Ray fights against the pain to force open the metal floor plates and get out - where he realizes they are stuck on board a cargo ship out in the ocean, with no hope of escape.
Meanwhile, Ray's team have no luck tracking him down and keep running into dead ends - not helped by the fact that Ray's business partner has sold him down the river, hoping to pick up a more handsome dividend at the end of the year. He also informs Hobbes about the real identity of his new prisoner.
Hobbes goes to town on Ray and his guards work him over with beatings and sleep deprivation to break him. Rottmayer tries to urge him to keep fighting. Before it's too late, Ray makes a deal with Hobbes that he'll relay back to him information from Rottmayer on the identity of the man he is protecting (Mannheim). Ray gets the message to Rottmayer, and they start to play back a long story to him while Ray recovers and looks for a way out.
Soon Ray realises that the only man who can help them is the Doc, and tries to play to his conscience. He slowly comes round when he sees that Ray wrote the book sitting on Hobbes' desk about prison breakouts.
With the help of Javed, a guy they fought against earlier, they conduct secret morse-code type messages to trick Hobbes into thinking there will be a riot in a different cell block. Once all the guards are deployed elsewhere, the action starts and the three men escape. The Doc uses the ship's radio to alert Rottmayer's people.
Hobbes shuts down the prison and they can't get out in time. Ray gets to the engine room to cause some damage, while Javed is shot and dies. When the power is cut, Rottmayer gets to the surface where he has a chopper waiting. He guns down more guards and waits for Ray. When Hobbes switches the power back on, he inadvertently releases Ray who was hiding inside an air pump. Rottmayer picks him up from the water.
There's a gunfight, and Ray manages to shoot a load of explosive tanks, taking out Hobbes.
They reach Morocco, and we learn that Rottmayer was Mannheim all along, and his daughter the CIA agent who hired Ray. The prisoner name 'Portos' was the key to let Rottmayer know he had a friend on the inside. Ray refuses a lift home, deciding to walk.
Back in LA, Ray's man Hush knocks out the other dodgy director, and he wakes up trapped in a huge container cargo ship traveling the oceans.