James Liverani of Oyster Bay calls it the chance of “a million lifetimes” — sharing a stage with music legend Paul McCartney.

After a preconcert sound check Sunday at MetLife Stadium in East Rutherford, New Jersey, McCartney invited Liverani, 29, to come on up.

But it wasn’t just to say hello: He and the former Beatle played “Get Back,” and even sang into the same microphone.

“It was just incredible,” a still-giddy Liverani recalled Wednesday. “It’s life-changing.”

Liverani attended his first McCartney concert in 1990 at Giants Stadium, which stood on the same property as MetLife. His father Tom, also a big fan, caught his first live show in 1976.

McCartney has been an inspiration to James Liverani, a musician who teaches orchestra, band and chorus at Friends Academy in Locust Valley.

“I’ve tried to emulate them [the Beatles], emulate him, my whole life,” he said.

advertisement | advertise on newsday

After waiting for an hour outside MetLife on Sunday, Liverani and his dad carried two signs into the sound check with them.

“We tried to think about what would catch his eye,” James Liverani said.

Tom Liverani’s sign read: “My son would be the coolest music teacher if he could play with his idol.” His son’s simply stated “Music Teacher.”

As McCartney was winding down a practice session, he looked out over the audience of about 300 and, noticing the signs, called the Liveranis up.

“We both kind of just — kind of got shaky after that,” James Liverani recalled.

Bass player McCartney joked about what instrument Liverani, also a bass player, would use.

The crew brought him one of guitarist Brian Ray’s signature Gibson guitars, and the two launched into “Get Back.”

Tom Liverani, 61, watched his son and McCartney from the shadows, until McCartney motioned for him to join in on the chorus.

“I was speechless,” the Levittown resident said. “You’re so proud to see your son . . . do what he’s been dreaming of doing most of his life.”

The final highlight came when the song was over and McCartney announced to the crowd: “You did good, James.”

advertisement | advertise on newsday

Asked Wednesday what he will tell his students when school is back in session, Liverani thought it over for a few minutes before giving his answer: “Dreams do come true. ”