Surprise! Hilary Duff revisited her beloved Disney Channel character Lizzie McGuire on How I Met Your Father.

The Hulu show's Tuesday (March 7) episode featured a charming, unexpected Lizzie McGuire throwback as Sophie (Duff) revisited her iconic tween character.

The episode, titled "A Terrible, Horrible, No Good, Very Bad Valentine's Day," featured footage of Lizzie talking to her first boyfriend, Ronnie, on the phone from the Lizzie McGuire Season 2 episode "First Kiss," in which Lizzie gets her heart broken when Ronnie decides to date a girl at his own school instead of her.

The flashback scene comes as How I Met Your Father characters Sophie and Ellen (Tien Tran) discuss Valentine's Day.

"A pre-puberty story doesn't count. A heartbreak before your period isn't real," Ellen tells Sophie in the clip.

"When I was 13..." Sophie says, as the show cuts to Lizzie flirting with Ronnie on the phone.

Watch the How I Met Your Father clip, below:

According to Entertainment Weekly, the idea to use the Lizzie McGuire clip came from the episode's writer Amy-Jo Perry.

"We all loved it, but the first thing we had to do was immediately fire off a text to Hilary and be like, 'How do you feel about this?' And she's the best — if she thinks it's funny, she totally is on board. It took her all of 10 seconds to be like, 'Yes, obviously, we have to do that,'" showrunner Elizabeth Berger said.

"I was like, ‘Of course, I’d be okay with it!’ Lizzie makes people happy. The fact that we could tie it into this show, I was obsessed with it. I loved it," Duff told Variety.

"Ummmm… yea .. don’t miss this week's episode of #howimetyourfather," Duff teased on Instagram prior to the episode's airing.

Showrunner Isaac Aptaker revealed that getting access the Lizzie clip was surprisingly easy.

"It's so easy because Lizzie was a Disney Channel show, and we work for Walt Disney Television, so it's all the same big corporate umbrella. That makes it all very, very seamless," he shared.

Both showrunners called it a "very easy creative process" and described what it was like to search for just the right clip to use from the Lizzie McGuire archives.

They also joked about how the short flashback is a treat for fans who were disappointed by the cancellation of the Lizzie McGuire revival.

READ MORE: Why Hilary Duff Didn’t Want to Play Lizzie McGuire Anymore

"Yeah, we can give people a tiny taste of what they didn't get with that reboot. We just try and give everybody every experience they can ever dream of. That was really fun to do," Berger said.

The short-lived revival was scrapped in 2020. "Sadly and despite everyone’s best efforts, it isn’t going to happen," Duff announced at the time.

The reboot was announced in August 2019. All the original main characters were set to return, including Lizzie's best friends Gordo and Miranda, played by Adam Lamberg and Lalaine respectively.

At the time, Duff said the scrapped revival, due to Disney's interference, would do a "disservice to everyone by limiting the realities of a 30-year-old’s journey to live under the ceiling of a PG rating" with Disney+ and requested that the show move to Hulu, which never happened.

Disney Stars Who Dated Each Other

Below, discover the most iconic Disney couples, including pairs you may have forgotten about!

More From 99.9 The Point