Actor Chris Pratt shows off a slimmed down, buff body in "Guardians of the Galaxy," which opened Friday.

But it's been a long road to losing 60 pounds in six months.

Last July, Pratt posted a photo to his Instagram account showing off his dramatic weight loss and newfound six-pack.

How did he do it? "Six months no beer. #GOTG Kinda douchey to post this but my brother made me," Pratt wrote alongside the below photo.

In reality, the process of losing pounds was a bit tougher.

"Three or four hours a day of just consistent, ass-kicking hard work," the 35-year-old actor told Men's Fitness.

Pratt's workouts included P90X , running, swimming, boxing, and kickboxing, and he even completed a triathlon.

With the help of a personal trainer and nutritionist, the actor increased his caloric intake to 4,000 calories a day and drank tons of water. "I was peeing all day long, every day. That part was a nightmare," Pratt told the magazine.

But the actor was happy to learn he could still eat on the intense weight-loss program.

"I actually lost weight by eating more food, but eating the right food, eating healthy foods, and so when I was done with the movie my body hadn't been in starvation mode," Pratt told People magazine. "It wasn't like I was triggered to just gorge myself and get really fat again."

Now, he says: "It's something that I think I can maintain because I don't spend four hours in the gym each day. I do maybe one hour in the gym maybe four days a week, and that's it."

Pratt joked to Vulture of his weight loss and gain for roles: "I just like to gain weight and lose weight. It’s a rollercoaster. I just want to do this. I want to touch God."

Before beefing up, Pratt was most well known for playing the bumbling Andy on NBC's "Parks and Recreation."

Pratt says he packed on 60 pounds for his role as a lawyer in 2013's "Delivery Man," in which he costarred alongside Vince Vaughn.

"The first 20 pounds was sympathy weight because my wife was pregnant," Pratt told SheKnows. "I was gaining weight as she was gaining weight ... The other 35 pounds I did just by declaring that I was going to do it. And then my rule of thumb became: 'If it's there, eat it.' And then I would order two entrees at every meal. I would always have dessert, and I would drink the darkest beer on the menu."

But before that, in 2012, he got into tip-top shape for the Oscar-winning film, "Zero Dark Thirty."

To play a Navy Seal, Pratt told People he "was doing 500 push-ups a day, working out at the gym, running five miles a day, but with no food, and I tore my body apart ... I felt terrible afterwards, had to get shoulder surgery, and I wore myself down doing that because I didn't have the proper coaching."

At the film's premiere months later, Pratt told E! Online: "I was about 50 pounds or 40 pounds lighter than I am now. I worked out really hard and I cut out everything bad for me for a long time and I just focused on trying to become a believable Navy SEAL."

The actor shared the below photo of his physique while filming during an appearance on "Conan."

In 2011, Pratt played real-life Oakland A’s baseball player, Scott Hatteberg, opposite Brad Pitt, Jonah Hill, and Phillip Seymour Hoffman in “Moneyball.”

Before that, Pratt appeared as Anne Hathaway’s ill-fated fiancé in the 2009 comedy, “Bride Wars."

That same year, he married his real-life love, actress Anna Faris.

The comedy couple, who welcomed their first child in 2012, are currently promoting "Guardians of the Galaxy."

Next up, Pratt stars in the "Jurassic Park" sequel, "Jurassic World." Despite his A-list looks these days, let's not forget a lighter-haired Pratt starred as Bright Abbott on the WB's "Everwood" way back in 2002.