Warning: The following contains SPOILERS for Harley Quinn, season 2, episode 2, "Riddle U."

The latest episode of Harley Quinn introduced the character of Barbara Gordon and showed her taking up the mantle of Batgirl. While this is not surprising (having been revealed by the trailer for Harley Quinn season 2), the series does offer an original origin story for just how Commissioner Gordon's daughter became a vigilante — and this time, it's all Harley Quinn's fault!

Like Harley, Barbara Gordon was originally created for a television show based on the Batman comics, though she made her debut appearance in Detective Comics #359 (January 1967) several months before she was introduced into the third season of the 1966 Batman show. In the comics, Barbara was on her way to a costume party in an outfit inspired by Batman when she stumbled across C-List villain Killer Moth in the middle of kidnapping Bruce Wayne. A skilled martial artist, Barbara stepped in and saved the day. Finding that she had a knack for heroism and determined to show up Bruce Wayne (who had the nerve to thank for her help but insist that crime-fighting was too dangerous for a woman), Barbara decided to become Batgirl in earnest and went on to save Batman and Robin's lives many times.

Related: Titans: How Barbara Gordon Could Factor Into Season 3

Barbara's origins have been reworked many times over the years as she was introduced into other mediums. The two-part Batman: The Animated Series story "Heart of Steel" saw Barbara stepping in to help Batman thwart a plot to replace Gotham City's civic leaders (including her father) with robot duplicates before she put on a Batgirl costume and adopted the name "Batgirl," which she did while trying to clear her father of corruption charges in the two-part "Shadow of the Bat." More recently, the New 52 Batgirl comics gave Barbara a new origin story in which she was inspired to heroism while protecting her younger brother and an injured officer during a hostage situation in GCPD headquarters, donning a mock-up of Batman's costume created by the police officers charged with tracking down and arresting Gotham City's most famous vigilante shortly after his first appearance.

Harley Quinn Barbara Gordon with Harley and Ivy in Co-Ed Disguises

Harley Quinn episode "Riddle U" introduces viewers to Barbara as a student at Riddler University, who is seemingly in Edward Nygma's employ, helping him film commercials for the college and offering tours of the campus to new students. In truth, Barbara is using her privileged position to investigate the mysterious disappearance of her fellow students. Her original plan was to gather intelligence for her father in the hopes that a chance to strike at the Riddler might spur him into action and get him out of her dorm room. Unfortunately, Jim Gordon has become so despondent in the wake of Batman's disappearance and his wife leaving him that he can't even be bothered to get dressed in the morning. much less think of fighting crime.

When Barbara stumbles across Harley Quinn and Poison Ivy as they're in the middle of infiltrating Riddler University as part of their own plan to take over Riddler's territory, Barbara asks for their help in saving her friends, offering up three VIP wrist bands into a party that the Riddler is organizing for select students. Unsurprisingly, the villains aren't interested in a team-up with Commissioner Gordon's nerdy daughter.  Despite this, seeing the two older women acting to do something (albeit for selfish reasons) give Babs the kick in the seat she needs to move against the Riddler without her father's help.

By the episode's end, Barbara has saved her classmates and defeated the Riddler, after donning a grey hoodie and black ski-mask and following Harley and Ivy into Riddler's secret base. Enjoying the rush of vigilantism, Barbara makes herself a more colorful costume (clearly inspired by her Batgirl of Burnside uniform in the comics) and the episode ends with her sneaking out into the night once again. It seems likely this isn't the last we'll see of the new Batgirl on Harley Quinn this season.

More: EXCLUSIVE: Harley Quinn Is More Popular Than Almost ALL The Arrowverse