Max Martini has joined the cast of Sony’s “Captain Phillips” starring Tom Hanks, and will play the Navy Seal commander who coordinated the rescue.

Paul Greengrass will direct with Scott Rudin, Michael De Luca, Dana Brunetti and Kevin Spacey producing.

Pic is based on the memoir “A Captain’s Duty: Somali Pirates, Navy SEALs, and Dangerous Days at Sea,” by Captain Richard Phillips. The true story revolves around the skipper of the cargo ship Maersk Alabama who gave himself up as a hostage to Somali pirates to spare his crew.

The ICM and Forward Entertainment-repped Martini has just finished Guillermo del Toro’s “Pacific Rim” from Legendary Pictures.