Photo via Instagram

The party onscreen during Sunday's Saturday Night Live 40th anniversary special was only the beginning.

During the afterparty, Prince performed with HAIM, Maya Rudolph and Jimmy Fallon, the latter of whom joined forces with the likes of Paul McCartney, Taylor Swift and Blues Brothers Dan Aykroyd and Jim Belushi.

Bill Murray, Miley Cyrus and Ariana Grande also took part in the fun, which last into the wee hours of the morning on Monday.

Watch clips below.

A video posted by Questlove Gomez (@questlove) on