Ryan Ahern was having his makeup applied in a trailer on the set of the action film “Unstoppable” when he recognized Chris Pine.

Ahern, a Scarborough native who is working on his first film, knew Pine as the actor who played Captain Kirk in the latest “Star Trek” film. He was surprised by how much Pine knew about him.

“He came up to me and said, ‘You’re Ryan, right? You’re the kid who was in Hollywood for two weeks and booked a Tony Scott film? Do you know how lucky you are?’ ” Ahern recalled Pine saying.

“I told him I knew I was a pretty lucky guy, surviving two tours in Iraq and now getting to do this,” he said. “I told him I was appreciative every day.”

Ahern, 25, will be on cinema screens across the country starting Friday, playing a young Marine veteran who tries to help Pine and Denzel Washington stop a runaway train in “Unstoppable.”

The film was directed by Tony Scott, whose directing credits include “Top Gun,” “Crimson Tide” and “Enemy of the State.”

Ahern doesn’t have many lines, but his character, Ryan Scott, is involved in some of the most crucial action in the film.

Scott has just returned from the military, and is lucky to find a job in the rail yard of his small Pennsylvania town. When the train emergency happens, he’s chosen to help because of his “special ops” military experience, Ahern said.

Art mirrors real life in this case. During his five years in the Army, Ahern was part of the 101st Airborne Division, and got lots of experience in air assaults by helicopter. In the role of Ryan Scott, he was asked to dangle from a rope attached to a hovering helicopter, 300 feet above the ground at one point.

Ahern did it without a problem. But he said the filmmakers wouldn’t let him do the actual “stunt” of jumping from the helicopter onto the train.

Apparently, hanging from a helicopter isn’t a “stunt” in Hollywood parlance. But it’s certainly not something everyone could do.

“They were flying me over a mountain, with a camera strapped to my chest aiming at my face,” said Ahern, who won’t get to see the film before Friday. “It’s not a huge role, but it’s pretty crucial to telling the story.”

In the credits, Ahern’s is the 17th name listed, with Washington, Pine and Rosario Dawson at the top. As the film was edited, Ahern’s character may have become a little more important.

In credits published online a month ago, Ahern was listed only as “Yellow vest vet.” This week, the credits list him as “Ryan Scott.”

Ahern graduated from Scarborough High School in 2003. He had thought about acting as a teenager, but had never done much about it. his own admission, he got “involved with the wrong crowd” and felt like he was headed for a life of trouble when he decided to join the Army at the age of 19. He hoped it would give him some focus and some needed discipline.

He was deployed to northern Iraq in 2005. During the next year, he was involved in air assaults on areas where insurgents were suspected to be. Ahern and other soldiers arrived in helicopters, jumped out and tried to capture the insurgents.

His second tour of duty, in Tikrit, lasted for about 15 months. During that tour, Ahern did forward observer work — moving into combat areas and then calling for and directing air and ground support.

He was never wounded, but once he was riding in a vehicle when it was hit by a roadside bomb.

While in Iraq, Ahern met a captain whose mother-in-law is a talent manager in Los Angeles. Ahern happened to mention he had thought about going to Hollywood to be an actor after his service was completed. The captain told him to call his mother-in-law, Rose Frohlich of the talent agency Reach for the Stars.

Ahern completed his service in September 2009. He packed his belongings in a rental truck and left Maine for Los Angeles. Soon after arriving, he got the audition for “Unstoppable.”

The movie was filmed in several towns with rail yards in western Pennsylvania and Ohio, including the Pittsburgh area and Steubenville, Ohio. During filming, Ahern met other actors. He was especially thrilled — and a little star-struck — to meet Washington.

When asked if he has other film opportunities ahead of him, Ahern said he isn’t at liberty to say. But his experience on “Unstoppable” was positive, and convinced him that he has the ability to pursue his acting dream.

“After I did the scene in the van with Denzel, they told me I could leave or I could stay and watch Denzel (do more),” Ahern said.

“Well, I’m going to stay and watch Denzel make a movie,” he said. “I had never seen anybody become somebody else like that. It was like watching magic happen.”

Staff Writer Ray Routhier can be contacted at 791-6454 or at:

[email protected]