Jennifer Aniston Puts Ellen DeGeneres on the Spot, Poses for Cute Justin Bieber Selfie

Jennifer Aniston hangs with two famous Justins on "The Ellen DeGeneres Show."

Everyone knows Ellen DeGeneres can count Jennifer Aniston and Justin Timberlake as two of her celebrity besties, but what happens when she's asked to pick a favorite?

Both 46-year-old Aniston and 34-year-old Timberlake surprised DeGeneres for her 2,000th episode of The Ellen DeGeneres Show -- airing Thursday -- when the "Mirrors" singer called the beloved host out after she referred to them as "two of her favorite people."

"Yeah, but if you had to pick one, who would you choose?" Timberlake pressed. "I mean, we all know who it would be, right?"

WATCH: Ellen DeGeneres Talks Jennifer Aniston and Justin Theroux's Wedding: 'It Was a Beautiful Night'

"I mean, it's a no-brainer," Aniston confidently quipped back.

Luckily, DeGeneres is a pro at getting out of a tough spot!

"I would just pick the both of you together," she responded. "As one unit."

WATCH: Seth Rogen Finally Buries His Beef With Justin Bieber on 'Ellen'

Timberlake wasn't the only superstar Aniston ran into during her surprise appearance. She also met Justin Bieber, thanks to the show's current "Bieber Week" celebration in honor of the 21-year-old pop star's new album, Purpose. The "Sorry" singer Instagrammed a black-and-white selfie of the two on Wednesday, with Aniston giving a tight grin to the camera.

Interestingly enough, the former Friends star is known to be close with Bieber's ex, 23-year-old Selena Gomez. In June, the "Same Old Love" singer gushed about her idol in a radio interview with KTU's Carolina Bermudez.

"Yeah… we met through my management -- they manage her as well -- so it was kind of like a friendly meeting and instantly she’s, like, inviting me to her house,” Gomez revealed. “She has a pizza oven. Like, we’ve made pizzas at her house. She's very cool and very sweet. She kind of gives me a lot of, like, maternal advice.”

Hmmm ... could any of the advice be about Bieber himself?

Watch below: