Somali-American Barkhad Abdi is a first-time actor, and he's co-starring with Tom Hanks in the new, ripped-from-the-headlines movie "Captain Phillips." Turns out, he says, that growing up in Somalia helped him understand the criminal he portrays.

"This guy, what he's been through, I've been through that. I relate to this character because I was lucky enough to have parents that got me out of Somalia and took me from country to country," says Abdi.

"But I look at him as someone who didn't have that chance," he continues, "There was no country there. There was no hope, no schools."

The film is based on the real-life story of pirates who commandeered a US cargo ship, the Maersk Alabama, and wound up in a showdown with US Navy SEALs.

Director Paul Greengrass kept Abdi and the other Somali-American actors apart from Hanks until the scene when the pirates board the fictional Alabama. Not only was the shooting scene the first meeting on film between the two, but it was actually the first meeting between Hanks and Abdi — who calls Hanks his film idol.

"I think it was a great idea," Abdi says. "And that idea is what made the film what it is now... because it built our characters, and it gives it the depth of who we really are and... how different [we are] from each other."

In the film, the young Somalis board a rickety junkyard skiff and battle huge waves to hook their ladder onto a cargo ship that's longer than a few football fields. These guys are mean, and you can appreciate their audacity.

Abdi says even though the film producers made him learn how to swim, being tossed about on rough ocean waves wasn't easy.

"It was scary, it wasn't all fun," he says. "But with my friends, we'd have laughs right after the scene was finished. It was just a whole new experience for us and I was truly fascinated by this whole pirate thing, and a small skiff taking over a big ship. Up close, I was amazed by it, honestly."

Looking to the future, Abdi says he can imagine a Hollywood film where the Somalis are the good guys.

"Somalia does have the good and the bad, just like America," he added.