One of Eagles' most famous songs turns up several times during Marvel's new movie Shang-Chi and Legend of the Ten Rings.

(Obviously, this article contains spoilers about the plot of the movie, so don't read any further if you want to maintain the element of surprise.)

When Shang-Chi begins, the movie's titular star, played by Simu Liu, has turned his back on his martial arts assassin upbringing and is trying to live a normal life in San Francisco. He and his best friend Katy, played by Awkwafina, work at a hotel and spend their nights at karaoke bars.

We soon find out that Katy can be a bit of a troublemaker, and that she likes to sing the 1976 Eagles smash "Hotel California" to confuse and distract people she's annoyed, in order to make a safe escape.

When Shang-Chi and Katy — who had no knowledge of her friend's mystical past — suddenly find themselves in a perilous fight against an army of highly trained warriors atop a skyscraper, she successfully uses the "Hotel California" trick to escape.

At the end of the movie, after they complete their long, world-saving journey, Shang-Chi and Katy meet Doctor Strange's wise sorcerer Wong, who warns them that even greater unknown dangers are heading their way and advises them to get a good night's rest.

But the fun-loving duo has other ideas, and the film cuts to a seemingly inebriated Wong, Katy and Shang-Chi belting out "Hotel California" together at a karaoke bar. Eagles' version of the song takes over as the end credits roll.

Shang-Chi and the Legend of the Ten Rings shattered Labor Day box office records this weekend, earning an estimated $71.4 million in the U.S. from Friday to Sunday.

Eagles recently resumed their Hotel California tour, which finds them performing every song from the hit 1976 album, at New York City's Madison Square Garden. The trek is currently scheduled to end with a Nov. 6 show in Seattle. You can find tour dates at their official website.

On Nov. 12, the live album Eagles Live at the Forum '76 will be released on vinyl for the first time.

Avengers, Rock! 39 Great Musical Marvel Universe Moments