Aniston, who was the first guest on “The Ellen DeGeneres Show” 19 years ago, joined the host for her final episode on Thursday.

Jennifer Aniston has always been there for Ellen DeGeneres.

The former “Friends” star, who was the first guest on “The Ellen DeGeneres Show” 19 years ago, joined the host for her final episode on Thursday.

During the pair’s chat, Aniston, 53, jokingly shared how she coped when “Friends” came to an end in 2004 after its celebrated decade-long run.

“Well, I got a divorce and went into therapy,” she quipped, referring to her 2005 split from first husband Brad Pitt after five years of marriage.

“Oh, and then I did a movie called, ‘The Break-Up,’” she continued. “I just kind of leaned into the end. I was like, ‘You know what guys? Let’s make this a completely new chapter… Let’s just end everything and start new.’”

“It worked great,” Aniston added as the audience laughed.

The “Morning Show” star, who walked onstage to the sounds of Donna Summer’s disco hit “Last Dance,” shared a long embrace with DeGeneres, 64, and danced alongside her, before the pair took their seats.

“Where does 19 years go? I don’t understand,” Aniston said as viewers saw a video screen showing images from the Emmy winner’s 20 appearances on the talk show.

Aniston and DeGeneres shared memories and laughs on the final episode of "The Ellen DeGeneres Show."Aniston and DeGeneres shared memories and laughs on the final episode of “The Ellen DeGeneres Show.”The Ellen Show

The longtime friends then reminisced about Aniston’s first appearance on the show, which found her gifting DeGeneres with a welcome mat.

“You had a golfer vibe going on,” Aniston joked about DeGeneres’ colorful ensemble on the debut episode.

When Aniston asked DeGeneres what her next chapter might include, DeGeneres responded that she had no idea.