The following contains spoilers for How I Met Your Father Season 2, Episode 12, "Not a Mamma Mia," which aired May 23 on Hulu.

Hilary Duff's How I Met Your Father protagonist Sophie Tompkins has put her romantic pursuits on hold to discover the identity of her father after an uncomfortably close call with John Corbett's Robert. "Not A Mamma Mia" saw Ted Mosby's sitcom successor and her friends investigating three potential leads on her father's identity before discovering that Clark Gregg's Nick Foster fit the barbed-wired bill.

Criminal Mind's star Paget Brewster plays How I Met Your Father's Lori Tompkins, the eternal party girl who conceived Sophie during Lollapalooza in 1991. Aside from attending the music festival, Lori informed Sophie that her biological father rocked a distinctive arm tattoo and a last name ending in "-ick." The episodes' investigation swapped the running list of candidates for the series' titular father with a much shorter-lived mystery regarding Sophie's own parental lineage.

RELATED: HIMYF's First Flashback Episode's Lizzie McGuire Clip Isn't The Only Throwback, There's Also a Drake & Josh Nod

False Leads and Misdirects on the Road to Sophie's Father

Sophie Tompkins standing on a street corner in a black coat on How I Met Your Father

Before Valentina's web-sleuthing narrowed Lori's clues down to three potential paternal candidates in the greater New York and New Jersey area, fans were allowed to extrapolate a long-shot How I Met You Mother connection from her vague description. Chris Elliott's Mickey Aldrin, father of Alyson Hannigan's How I Met Your Mother protagonist Lily, was separated from his wife in the '80s and both possessed a notable "-ick" nickname and a penchant for hooking up with the characters' mothers. However, Lori mentioned a tattoo rather than a board game obsession, indicating that the comedy spinoff had opted not to exploit the mystery surrounding Sophie's father to leverage further How I Met Your Mother cameos.

After the split party investigated two false leads, Rick and Dick, Sophie and her friends wound up at the grave site of Nick Foster. The realization that Sophie's father may have passed distressed the crew before Gregg's Nick appeared to mourn the father with whom he shared a name. Following Nick back to the hot dog shop he owned, Sophie's friends conducted a series of social experiments to test whether he was as dad-worthy as a Pedro Pascal character.

RELATED: How I Met Your Father's Meredith is the Worst of Gossip Girl's Blair Waldorf

Clark Gregg's Nick Fits the Paternal Bill

How I Met Your Father Clark Gregg Nick Foster is Hilary Duff's Sophie Tompkins' Father

Sophie's friends run Nick through a series of "Dad Tests" to measure his compassion, capacity for fun, and lack of creepiness. Nick unknowingly met their requirements and even scored bonus points for feminism. Social tests and arbitrary rules demark a staple connective tissue between How I Met Your Mother and its contemporary spinoff. Between Barney Stinson's Bro Code and Playbook, a whimsical set of social rules dictate the signature humor of How I Met Your Mother's core friend group and that thread continues with Sophie's ensemble in experiments such as the "Dad Test."

Despite his stellar grade on the aforementioned test, Sophie bailed on making a formal introduction to her father. The catch-up work required for them to establish a father-daughter bond frightened and overwhelmed her. However, "Not Another Mamma Mia" ended on a cliffhanger that gave Sophie another shot at connection. Gregg established the crucial role he'll play in the second half of How I Met Your Father's second season when he tracked down Sophie at Pemberton's. With Cobie Smulder's Robin Scherbatsky making a cameo in the show's first season, Gregg's inclusion in the sitcoms' shared universe connects Sophie to two former characters on Agents of S.H.I.E.L.D. On How I Met Your Father, Gregg traded in the stakes of unleashing Hydra-level threats for the more tempered, albeit comedic, interpersonal challenge of reconstructing the lost years between a father and daughter.

How I Met Your Father drops new episodes on Tuesdays and is available to stream on both Hulu and Disney+.