INDIO, Calif. — Paul McCartney and Neil Young shared the bill at the Desert Trip music festival Saturday, and they also shared the stage during McCartney’s set.

Young joined the former Beatle to perform “A Day in the Life,” which morphed into John Lennon’s “Give Peace a Chance.” The audience flashed peace signs as they sang along. Young played lead guitar to duet with McCartney on “Why Don’t We Do It In the Road?”

“Thank you, Neil,” McCartney, 74, said when his friend left the stage. “I love that boy!”

McCartney’s headlining 2 ½-hour set was full of love. He paid tribute to his late wife and his current spouse during the performance, along with George Harrison, Jimi Hendrix and the Rolling Stones.

He sang “Maybe I’m Amazed” for the late Linda McCartney, and dedicated “My Valentine” to his wife, Nancy, ahead of their fifth wedding anniversary Sunday.

He brought out a ukulele to perform Harrison’s “Something,” but stopped the song almost as soon as he started.

“I’m out of tune,” McCartney said, alone on stage. “I’m going to get another one.”

A stagehand brought him another ukulele and McCartney began again.

“At least it proves we’re live, right?” he cracked.

Backed by a five-piece band, he played a few bars of “Foxy Lady” to honor Hendrix, and recognized the Stones with “I Wanna Be Your Man,” which McCartney and Lennon wrote for their colleagues in the early 1960s.

(The Rolling Stones headlined the first night of Desert Trip and covered the Beatles’ hit “Come Together.” Mick Jagger introduced it by saying, “We’re going to do a cover song of some unknown beat group.”)

Besides ukulele, McCartney played bass, guitar and piano. He performed his earliest (pre-Beatles) recording, “In Spite of All the Danger” from 1958, and his most recent track, “FourFive Seconds,” made last year with Kanye West and Rihanna.

McCartney accompanied himself on guitar for “Blackbird,” explaining that he wrote the song in the late 1960s after hearing of the civil rights struggles in the United States. He also shared stories about his first recording session with the Beatles, saying he can “still hear the nerves in my voice” on “Love Me Do.”

Also included in his set: “A Hard Day’s Night,” ”Can’t Buy Me Love,” ”Eleanor Rigby,” ”Helter Skelter,” ”Band on the Run,” ”Let it Be” and “Back in the U.S.S.R.”

Earlier Saturday, Young played a blistering set with his band, Promise of the Real.

Wearing his trademark black hat, the 70-year-old singer-songwriter began his set alone behind the piano, opening with “After the Gold Rush” and accompanying himself on harmonica.

He then strapped on an acoustic guitar to play “Heart of Gold” and “Comes a Time” before his band joined him onstage. Their nonstop set included “Harvest Moon,” ”Powderfinger,” and “Welfare Mothers,” which Young joked was “Donald Trump’s new campaign song.”

A highlight was “Down By the River,” which became an extended 10-minute jam, with Young shredding his well-worn Les Paul.

There were subtle and overt political overtones to the performance. Women dressed as farmers, in plaid shirts and overalls, pretended to throw seeds and tend small plants onstage before Young came out. Later, men in hazmat suits acted as though they were spraying the grounds. Young wore a T-shirt that read “Water is life.” An old-fashioned seed packet served as a backdrop for the stage.

“Tomorrow night come back,” Young told the crowd. “Roger (Waters) is going to build a wall and we’ll make Mexico great again!”

Waters and the Who are set to close out the festival Sunday.

Follow AP Entertainment Writer Sandy Cohen at .