Paul McCartney, a surprise guest on the final episode of “The Late Show With Stephen Colbert,” provided a poignant capper to the series by being given the ceremonial honor of turning out the lights in the Ed Sullivan Theater, a location with which he has plenty of history.

The final number had McCartney and Colbert singing the Beatles classic “Hello Goodbye,” accompanied by Elvis Costello and Jon Batiste. and joined on stage by a parade of staffers dancing as the house band turned the ’60s tune into something with a New Orleans-style coda.

Then Colbert was seen in a filmed bit taking McCartney back to the breakers and flipping a switch that not only turned the lights out but sent the Sullivan Theater into a green interdimensional portal introduced earlier in the show by Neil DeGrasse Tyson.

The symbolic gesture followed McCartney’s stint as the show’s final interviewee as well as last musical performer,.

The Beatles’ appearance on “The Ed Sullivan Show” on Feb. 9, 1964 is often credited as being the turning point that helped push the already fast-rising group over the top toward ultimately becoming the most successful group in music history. This crux point for Beatlemania was viewed by a reported 73 million viewers, or about half of the U.S. population at the time.