What was the story behind the goat in How I Met Your Mother? The farm animal appeared in the sitcom's third season, but its backstory wasn't revealed until the end of the following season.

Before the goat was physically shown in the series, Future Ted Mosby (Josh Radnor) teased the story to his kids. In the first season, he was sharing the details of his 28th birthday and mentioned that there were only a few years left until he hit 30 years old. He claimed his 30th birthday wasn't bad except for the goat in his bathroom. The details about the goat wouldn't be explained until the season 2 episode, "The Goat."

Related: How I Met Your Mother: Slap Bet Rules & All 8 Slaps Explained

Ted later realized that the goat incident actually took place during his 31st birthday, not his 30th. A farmer brought in a goat to teach a lesson to Lily's (Alyson Hannigan) Kindergarten class, and went into the horrifying detail about what would happen to Missy the goat when she visited the butcher. Lily and the rest of the class were terrified, so she took it home to the apartment. She fully intended to hand Missy over to animal control, but then got attached to the animal.

Josh Radnor as Old Ted in How I Met Your Mother

The rest of the story was finally resolved in the following season with the episode "The Leap." Ted returned home to the apartment where he found Missy wandering the living room. He tried to work on his architecture project but Missy kept bugging him. Ted tried to ignore the goat but she kept chewing on a washcloth. Every time Ted hid the washcloth, Missy would magically find it, annoying him even more.

Ted couldn't take it anymore. He confronted Missy - and she attacked him! He and the goat wrestled around the apartment, but Missy kept overpowering him to the point where he needed to go to the hospital. Ted was released shortly after being beaten up by the goat, but the event helped serve as an important wake up call.

Before that point, Ted was going through a rough time with losing his job and and being left at the altar. After the goat incident, Ted's friends convinved him to take the metaphorical leap by quitting his architect job and accepting the offer to become a professor at Columbia University. The group then traveled up to the roof where they all made an actual leap across the roof. Ted's decision paid off because the "Mother" was a student in his first class, a story that went on to help them reconnect later in life, as seen in the final season of How I Met Your Mother.

Next: How I Met Your Mother Almost Ended After Season 8 - Here's Why