Paul McCartney and David Letterman

Paul McCartney, in his first-ever appearance on the Late Show with David Letterman, performed on the marquee of the show's Ed Sullivan Theater and reminisced about The Beatles' appearance there, 45 years ago, and the beginning and end of his friendship with Michael Jackson.

McCartney delivered a vibrant version of "Get Back" and a new song, "Sing the Changes," to thousands of fans who filled Broadway to watch the legendary singer perform.

Watch McCartney's full performance — even songs that weren't aired

He told Letterman he was 22 when he and the rest of the Beatles performed at the Ed Sullivan Theater in 1964, the start of rock's British Invasion. He also recalled performing "Yesterday" solo and saying no when a floor manager asked if he was nervous about performing it alone.

"You should be," McCartney recalled the manager saying. "There's 73 million people watching."

McCartney also went into detail about his first contact with Jackson, with whom he collaborated on the hits "Say Say Say," and "The Girl is Mine."

See pictures of McCartney

"It was great, we had a great time," McCartney said. "It was Christmas and I was at home and my phone rang and a little voice talked to me and I said 'Who's this?' you know, kind of guarding my privacy, my private number.

"I said who's this? 'It's Michael.' I thought it was, you know, a little bit sort of dodgy. But anyway he said, 'Michael Jackson.' He said, 'You want to make some hits?' So I said, 'Yeah, sure' - you know, being of the hit-making variety."

The two became "very good friends," McCartney said, but it "actually kind of fell apart" when Jackson bought the Beatles catalogue. McCartney said he tried to make a deal with Jackson after the singer purchased the catalogue.

See McCartney and Jackson together

"Somebody had to get it, I suppose. What happened actually is then I started to ring him up because I thought, here is the guy historically placed to give Lennon/McCartney a good deal at last. Because we'd got signed when we were 21 or something in a back alley in Liverpool and the deal remained the same even though we'd made this company the most famous and hugely successful. So I kept thinking, it was time for a raise.

"We never kind of got to it and I thought, Mmm, so we kind of drifted apart. It was no big bust-up. ... But he's a lovely man, massively talented, and we miss him."

McCartney's trademark dry wit was in full effect when Letterman messed up a cue to a commercial.

"Not reading your cards," he chided.

Letterman joked that the crowd filling the streets outside his studio was the largest since the "Fire Letterman" rally inspired several weeks ago by his jokes about Gov. Sarah Palin. McCartney continued playing for those gathered even after the taping.

What did you think of McCartney on Letterman?