It was a veritable British invasion.

In addition to the 3,117 students who graduated on Monday, the University feted a Beatle, a Cantab and a Nobel laureate as among the recipients of eight honorary degrees, adding a pronounced dose of celebrity to the University’s 307th Commencement.

[ydn-legacy-photo-inline id=”12193″ ]

The identities of the recipients of Yale’s honorary degrees — the highest honor granted by the University — are tightly held secrets each year, and graduates and their families were treated to a surprise when they opened their programs Monday morning at Commencement.

Or, at least, mostly a surprise.

It turned out that former British Prime Minister Tony Blair, who delivered the Class Day address on Sunday, was not the only Englishman to descend upon the Elm City this weekend. On Sunday night, when Blair visited the Yale Center for British Art for a dinner, he brought another Briton along with him.

That special someone: Sir Paul McCartney, of Beatles fame.

At Commencement on Monday, McCartney was awarded a doctorate of music for nothing short of his “musical genius,” as his award citation explained it.

“Your songs awakened a generation, giving a fresh sound to rock, roll, rhythm and blues,” University President Richard Levin told McCartney. “Here, there and everywhere, you have pushed the boundaries of the familiar to create new classics.”

McCartney — who received his degree to a rendition of “Hey Jude” — was treated to a standing ovation when he shook Levin’s hand. Also earning loud applause was Harvard President Drew Gilpin Faust, a civil war historian named Harvard’s first woman president.

Faust on Monday received a doctorate of humanities from Yale — adding to her list of degrees not from Harvard. (She is the first Harvard president who is not a Cantab graduate.)

“You are, simultaneously, a historian’s historian and a leader of institutions,” Levin said. “We welcome you,” Levin added, “to the Yale family.”

Among the other degree recipients were Cesar Pelli, world-renowned architect and former dean of the Yale School of Architecture, and R. K. Pachauri, who won the Nobel Peace Prize last year for his role at the helm of the Intergovernmental Panel on Climate Change.

Honorary degrees are awarded by the Yale Corporation, the University’s highest governing body, based on the recommendations of a committee comprised of Corporation members, faculty and alumni. Also receiving degrees were poet John Ashbery, former U.S. Trade Representative Carla A. Hills LAW ’58, theologian Mercy Amba Oduyoye and astrophysicist Martin Rees.

But it was McCartney who stole the show. He attracted a crowd of onlookers when he appeared outside the Yale Center for British Art on Sunday night and was the talk of the Old Campus on Monday.

Traditionally, the identities of honorary degree recipients are not revealed in advance of when the degrees are actually conferred. But as if the McCartney sighting on Chapel Street was not enough of a hint, the News reported late Sunday night — citing sources involved in Commencement planning — that the rock icon would receive an honorary degree on Monday.

Before Commencement, officials remained mum on the possibility, although Levin offered his own interpretation of the McCartney sighting.

“”Here’s one comment: Yesterday … all my troubles seemed so far away. Now it seems as though they’re here to stay. Oh, I believe in yesterday,” the president wrote. “Or perhaps another, relative to the Sir Paul sightings: Here, There and Everywhere.”

Sure enough, McCartney processed onto the dais around 10:30 a.m. Monday and the secret was out. Just as visitors to Commencement eagerly gabbed about the pop star’s visit to campus, Levin, too, confessed his own case of Beatlemania.

The year was 1966, and the Beatles were about to play at Candlestick Park in San Francisco in what would go down in history as their final live concert.

Levin, then an undergraduate at Stanford, won two tickets to the concert by phoning a radio station and being the first caller to correctly identify a certain Beatles tune.

The tickets were in the top row of the stadium’s upper deck. But the girlfriend of Levin’s brother had two prime seats, Levin recalled.

Levin’s brother was out of town at the time, so his girlfriend was planning to bring her sister along to the concert. But Levin — in a scheme that showed the shrewdness no doubt necessary to be president of an Ivy League university — had a different idea.

The future Yale president called his brother’s girlfriend — “with my brother’s permission,” he noted for the record — with an offer to make. “Wouldn’t your sister like two tickets to the Beatles so that she could take a friend?” he recalled.

She agreed.

“I parlayed the two tickets in the nosebleed section into a seat for myself in the third row of field boxes,” Levin recalled proudly, “long before the eBay era!”

Levin won that contest back in 1966 by identifying the song “In My Life,” “from their brilliant ‘Rubber Soul’ album,” the president recalled.

At Commencement on Monday, four decades and 3,000 miles removed from scoring those tickets as a college student himself, Levin began McCartney’s award citation with a line from that very song he once named.

“There is no one compares with you,” Levin said.

The crowd roared. Levin smiled. And McCartney, standing even closer than at that Candlestick concert, smiled back.