A rattled Taylor Swift narrowly avoided her ex-boyfriend Jake Gyllenhaal at a Golden Globes afterparty on Sunday, Jan. 11 -- get the exclusive scoop from Us Weekly! Credit: Kevin Mazur/Getty Images; Christopher Polk/NBC/NBC via Getty Images

Bound to happen! A-list exes Taylor Swift and Jake Gyllenhaal were packed together in the same star-studded Golden Globes afterparty on Sunday, Jan. 11, and Us Weekly has the exclusive details on what went down inside Hollywood hotspot Chateau Marmont.

One observer tells Us that Globe nominee Gyllenhaal, 34, hit the center of the dance floor shortly after midnight, where he was flanked by beautiful women galore. British singer Rita Ora was one of his many admirers, and danced briefly with the hunky actor to Roy Orbison's "Pretty Woman," when their moment was interrupted by none other than Trophy Wife hottie Malin Akerman.

A flirty Akerman stole Gyllenhaal away while his big sister Maggie Gyllenhaal and The Affair star Ruth Wilson were animatedly chatting nearby.

Moments after 2:00 a.m., Gyllenhaal's superstar ex-girlfriend Swift — clad in a bright marigold Jenny Packham gown — arrived at the bash.

A second eyewitness tells Us that upon spotting each other, they were actually completely cordial. “Taylor and her friends arrived at the Chateau Marmont just before 2 a.m. and Jake was there in the lobby. He was leaving as she was coming in. Taylor ran up and gave him a big hug and they caught up,” the eyewitness tells Us. “They were smiling and looked like any old friends catching up.”

A third eyewitness confirms the exes encounter was indeed friendly. “Taylor said ‘Hi,’ and he said ‘Hello’ back and smiled,” the insider tells Us.

Before Amy Poehler and Tina Fey's party, the exes also attended the Weinstein and Netflix Golden Globes bash at the Beverly Hilton, where they were seen having fun with pals separately.

Gyllenhaal and Swift famously dated for two intense months in fall 2011 — including Thanksgiving at Maggie's Brooklyn home — when the actor, then 30, suddenly blindsided the pop star, then 21, and broke up with her abruptly over the holidays.

The trauma, however, inspired several breakup anthems for the singing sensation, whose 2012 Red album was largely about Gyllenhaal — including the emotional ballad "All Too Well."

Swift later hinted to New York magazine in a 2013 interview that the actor reached out to her about the album. "He was like, 'I just listened to the album, and that was a really bittersweet experience for me,'" she recalled. "'It was like going through a photo album.' That was nice."