Alyson Hannigan is reflecting on her opportune experience as a contestant on "Dancing with the Stars."

The 49-year-old actress, best known for her portrayal of Lily Aldrin on the popular sitcom "How I Met Your Mother," took to Instagram to show pictures from the beginning and end of her dancing journey, noting she had lost 20 pounds in 10 weeks.

"The before and after says it all," she wrote. "I lost 20 pounds of both weight and emotional baggage during my time on @dancingwiththestars. I can’t thank @sashafarber1 enough for helping me shed my insecurities and getting me to the confident and strong place I am today!"

'DWTS' BODY TRANSFORMATIONS

Alyson Hannigan in a sparkly fringe dress poses with her hand on her hip for DWTS split Alyson Hannigan on the set of DWTS" with both hands on hips in a different sparkly fringe dress

Alyson Hannigan shared photos from the beginning and end of her journey on "Dancing with the Stars," sharing she had lost 20 pounds. (Getty images)

LIKE WHAT YOU’RE READING? CLICK HERE FOR MORE ENTERTAINMENT NEWS

Hannigan and her dance partner Sasha Farber made it to the finale, placing 5th overall. 

"I can’t believe @dancingwiththestars is over," Hannigan wrote to Instagram earlier in the week. "But the memories, friendships, and learnings will last a lifetime! I’ve learned that I am capable of doing things that I’ve told myself my whole life that I’m not capable of doing," she shared. 

"And to really just go in with a positive attitude and try and work hard. The fact that I got to perform in the finale to me is a win. The support that I’ve had is indescribable and I’m forever grateful!"

APP USERS CLICK HERE TO VIEW INSTAGRAM

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

Hannigan previously described to Fox News Digital how her life had been impacted by the casting, with rigorous training sessions being sandwiched by school pickups and drop-offs of her kids. After those long days, she said she'd find herself on the couch, alternating between an ice pack and heating pad.

"That's literally what people don't get to see. They get to see the dance and the package which is amazing and it shows a little bit of the hard work. But it's a lot," Farber told Fox News Digital of Hannigan's work ethic. 

Alyson Hannigan and Sasha Farber both wearing gold outfits dance facing each other on "DWTS"

Alyson Hannigan and her partner Sasha Farber competed in the finale of "Dancing with the Stars." (Eric McCandless/DISNEY via Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

"What these celebrities go through is remarkable. Because they're learning such a different sequence of steps, movement, timing, musicality, audience, lights, cameras, dresses … the shoes!"

Hannigan isn't the only star to document her weight-loss journey during the show. The late Kirstie Alley, Marie Osmond, Gladys Knight and Drew Scott are just a few that have been candid about shedding pounds.