"Jason Bourne." YouTube/Universal It's been nine years since Matt Damon last played former CIA assassin Jason Bourne. The role proved Damon could be not just an action star, but also the face of a hit worldwide franchise. Damon now returns to the character in the much-anticipated "Jason Bourne" (in theaters July 29), and he's arguably in the best shape of his life.

A big part of that is thanks to trainer Jason Walsh, who has been working with Damon since the actor played a chiseled ex-criminal in the 2013 sci-fi film "Elysium."

Damon has continued to work with Walsh because of his training methods, which are dedicated more to creating an athletic physique than getting super-buff. That suited Damon, 45, as he was dealing with ailments when they first met.

"He had issues with this lower back and shoulder," Walsh recently told Business Insider of getting to know Damon. "He had heard that I'd corrected injuries with people who had been living with injuries and pain for a long time so in a couple of weeks I helped him out with his shoulder injury and soon after we got his back cleared up and he was 100-percent feeling great so we continued from there."

"Elysium." Sony Walsh didn't hear from Damon for a year after "Elysium" wrapped, but then he got a call from the actor, who said that he booked three movies in a row and needed Walsh's talents.

Those movies were "The Martian," "The Great Wall" (opening in early 2017), and "Jason Bourne."

In September of 2014, they got back to work to get Damon in shape for the films.

"My biggest thing with Matt is making sure his foundation is solid, and that means he has mobility, flexibility, and overall strength," Walsh said.

"Bourne" was the final film of the three to be made, so by then Damon was in great shape. But director Paul Greengrass told Walsh that, this time around, the look Damon needed to play Bourne was of someone both mentally and physically distraught.

This led to a simple plan for Walsh's training of Damon for "Jason Bourne."

"I just kicked the s--- out of him without breaking him," Walsh said.

Leading up to filming and during production, Walsh had Damon work out on a VersaClimber, which is a piece of cardio equipment that works out the entire body as you pull up and down with your arms and legs in a standing position (almost like climbing a mountain, but doing it much faster).

In this Instagram video, Damon (on the left) can be seen working out on the machine alongside Walsh during filming of “Jason Bourne.”

Sunday #work #church #versaclimber #labordayweekend fastest to 100ft x 12sets 1 min rest great finisher. Team #RiseNation love my job #trainsmarter #trainhard #nodaysoff A video posted by Jason Walsh (@risemovement) on Sep 6, 2015 at 7:21am PDT Sep 6, 2015 at 7:21am PDT

“If you could see his face after that one, it was fantastic," Walsh said of the video. "He literally sat down next to the wall and looked like he was about to chuck."

Workouts with the VersaClimber that Walsh came up with included seeing how fast you can get to 200 feet or going as fast as you can for one minute. (Walsh, who's also trained Bradley Cooper and Justin Timberlake, among other stars, gives VersaClimber classes known as Rise Nation. He has two locations in Los Angeles and one coming soon to New York City.)

But that wasn't all. Walsh also incorporated daily workouts like:

- 100 sit-ups

- 300 push-ups

- Squats (50 reps)

- Squat jumps (50 reps)

- Pull-ups with 35 pounds strapped to waist

- Single-leg squats with 125-pound dumbbells in each hand

- Sled push and pulling

Along with Damon's chef giving him around 2,000 calories a day during shooting, Walsh also cut back Damon's water intake. Nearing dehydration showcased his body's glamour muscles.

"You start off drinking quite a bit of water the week leading up to shooting," Walsh said. "And then you start cutting back around two days before a specific shooting day, and then on the day [of shooting] you don't have much water in your system."

This method was used while shooting the boxing scene that's been showcased in the "Jason Bourne" trailers, in which Damon knocks out his opponent with one quick punch.

Walsh said that when a photo of Damon shirtless on the "Bourne" set hit the internet and instantly became a trending topic, he couldn't have been prouder.

Our team is so proud and honored to be a part of this project. This is a picture from day 1 of shooting and exemplifies that hard work and dedication pay off. MD is strong, and Jason Bourne is back my friends! Photo credit by the talented @jasinboland hand wrapping by legendary @mattbaiamontesboxingclub epic cooking by epic chef @babe_the_big_blue_ox #dedication #photooftheday @risenation @shawnvance #family #hardwork #earnit A photo posted by Jason Walsh (@risemovement) on Sep 9, 2015 at 7:23am PDT Sep 9, 2015 at 7:23am PDT

"He worked his a-- off," Walsh said. "A lot of people don't know what it's like to work that hard and work that long, we had been working out for a year and a half straight! I'm really proud of him."

But every person has their breaking point, and Damon's came when "Bourne" wrapped.

"The day of wrapping there was a large pizza waiting for him," Walsh said.