Fate is a tricky thing. “Once Upon a Time” continued Emma’s (Jennifer Morrison) tale Sunday night, revealing a major jaw dropper -- Emma’s fate is entwined with Maleficent’s (Kristin Bauer van Straten) daughter, Lily (Agnes Bruckner).

Episode 19, titled “Lily,” started off with a flashback to the Enchanted Forest of the past. After Maleficent’s baby absorbed all of Emma’s potential for darkness and got shipped through a portal, the Sorcerer’s Apprentice (Timothy Webber) went to his master to try and fix the situation. However, there was no way to undo the horrible act that was caused by the Author. Instead, the Sorcerer explained Emma and Maleficent’s child would be connected for the rest of their lives. But the Author didn’t get off that easily. The Sorcerer’s Apprentice used magic to place him in the pages of the Fairytale Book so he could only record and not “toy with fate again.”

“Once Upon a Time” viewers know Emma and the others accidentally set the Author free in Storybrooke -- and now he’s stirring up trouble again. Emma was on the edge of turning dark, and Gold (Robert Carlyle) and the Author were making sure she stayed on that path.

Fortunately Emma got a new ally -- Maleficent. After Cruella de Vil’s (Victoria Smurfit) death, Maleficent figured out Gold doesn’t have her best interests at heart. Knowing Emma’s ability to “find people,” Maleficent enlisted her help in tracking down Lily. Although Emma didn’t want to run away from Gold, she quickly figured out Lily was her old friend from her foster home days and jumped at the chance to find her.

Fans know a little bit about Lily and Emma’s history from previous episodes, but Sunday night’s installment revealed even more. In 1999 Emma was placed in her ideal foster home. She finally had a family, but Lily showed up and complicated things. Lily was wanted for armed robbery. Emma tried to get her to leave and even offered her whatever chore money she had saved. However, Lily told her she couldn’t leave town without her beloved necklace, the only thing she had of her birth mom. To get Lily out of her foster family’s house, Emma went to the place Lily was squatting to get the necklace. But while Emma was gone, Lily stole her foster family’s vacation money. After being confronted by her foster parents, Emma fled the house. Lily found her at the bus stop and begged her to run away with her. Emma was done with Lily though. Despite Lily’s pleas about being cursed and having things seem “brighter” with Emma around, the pair parted ways.

Meanwhile in present day, Emma and Regina (Lana Parrilla) went to Lily’s last known address in Massachusetts. Her landlord said Lily died in a car accident a couple years ago, and Emma almost snapped when he began to bad mouth Lily. Regina took Emma out of the building before she did anything drastic, but the two didn’t make it far. A wolf ran in front of Emma’s car, and she got a flat tire. But the flat wasn’t an accident. It was fate.

When Emma and Regina went to get a new tire and a cup of coffee at the nearby gas station, Emma discovered Lily had changed her name and was working as a waitress. Emma approached her old friend and told her she wanted to help. But Lily wasn’t looking for help. She lied to Emma and told her she was happily married with a kid. However, Emma knew that Lily was lying. With Regina by her side, the pair found Lily’s address and broke into her house. To their surprise, they discovered Lily knew about Storybrooke and Maleficent, and that Snow (Ginnifer Goodwin) and Prince Charming (Josh Dallas) were responsible for all the darkness in her life.

Before they could process everything, Emma heard her car start. Lily had followed them back to her house and stole Emma’s car -- which contained the scroll to enter Storybrooke. Realizing Lily wanted revenge on Snow and Charming, Emma quickly broke into a car and sped after her. They managed to catch up to Lily and stop her before she got to the border, but Emma was boiling with anger. Knowing Lily wanted to hurt her family, the pair exchanged a couple of punches before Emma pulled out a gun.

“Thanks to you I’m hardwired for bad decisions,” Lily told Emma. “My life isn’t worth saving. If you let me go I will destroy everything. That’s what I do. Be the hero and end this right here before it even starts.”

Emma was seriously considering it, but Regina was there to talk her down. “You’re better than this,” she told Emma, explaining she was doing exactly what Gold wanted. Regina’s words worked. Emma put down the gun and agreed not to kill Lily.

The pair started to bond and Emma promised she wouldn’t push her away again, but Regina interrupted with bad news: Gold had stolen back Belle’s (Emilie de Ravin) heart. Without the heart, Regina had no leverage against Gold, meaning Robin Hood (Sean Maguire) was in danger.

Regina and Emma brought Lily along to New York to rescue Robin and his son. However, things didn’t go as planned. Robin didn’t believe Regina at first when she told him that Zelena (Rebecca Mader) was impersonating Marian (Christie Laing). However when Zelena revealed herself, he still wouldn’t leave.

“I can’t leave her here,” he told Regina. “She’s pregnant.” That wasn’t the only bombshell in episode 19 of “Once Upon a Time.” Another flashback revealed the Sorcerer’s Apprentice was the one who told Lily the truth about her mother and magic.