Rocker Tom Morello is shedding light on Ozzy Osbourne’s final Black Sabbath show.

The late metal god’s friend, 61, shared that Osbourne knew Black Sabbath’s Back to the Beginning concert July 5 would be his last performance.

The Prince of Darkness died July 22 at 76.

Metallica’s James Hetfield and Ozzy Osbourne at Black Sabbath’s farewell concert. Ozzy Osbourne/Instagram

Morello reflected on being appointed the musical director for the benefit concert in Birmingham, England, by Osbourne and his wife, Sharon.

While on Chicago’s Q101 radio Saturday, the guitarist for Rage Against the Machine and Audioslave described Osbourne as “one of the all-time greats.”

Ozzy and Sharon Osbourne backstage with Jason Momoa at the Black Sabbath concert. Ozzy Osbourne/Instagram

Morello’s goal with the concert was to put together “the greatest day in the history of heavy metal.”

“I laid out to make it a great show for fans and for them,” he said, revealing that the band “got to play and feel the love not just from the bands, not just from the 40,000 people in the stadium but from people all over the world.

“The fact that he lived to play and feel that love and to one more time… You know, to do ‘Paranoid;’ to do ‘Crazy Train.’ If you have got to go — I mean, I wish Ozzy lived another 30 years — but if you’ve got to go out, it really felt like he knew,” Morello mused.

During the concert, Osbourne sat on a black throne while he sang five songs solo. He was then accompanied by his former bandmates Tony Iommi, Bill Ward and Geezer Butler for four final Black Sabbath tunes.

“On the day, a million things could have gone wrong, and maybe like three things did. But it felt like a spiritually great moment for all fans of rock and roll,” Morello reflected. “Ozzy and Sabbath could not be more important to me personally as a fan and as an artist.”

He called the rock star’s death “a tragedy,” but said it was “a miracle” that Osbourne “lived as long as he did.”

Ozzy during the Black Sabbath show. Ozzy Osbourne/Instagram

“Ozzy Osbourne’s lived a pretty on-the-edge lifestyle for a long time,” he said.

Morello also felt the former reality star saw the concert as an opportunity to bow out on a high note.

“He had been frail for a while, but friends of mine saw him a week later. He was at another event in Birmingham a week later,” Morello added.

Osbourne’s family confirmed the news of his passing in a statement to The Post last month.

Ozzy with Slash and Axl Rose weeks before his death. Ozzy Osbourne/Instagram

They stressed that the heavy metal icon died “surrounded by love.”

According to a death certificate obtained by the Sun, Osbourne died from cardiac arrest, acute myocardial infarction, coronary artery disease and Parkinson’s disease.

Ozzy in 2010 in London. Getty Images

Osbourne was laid to rest near the lake of his Buckinghamshire home July 31. Around 110 people reportedly attended the private ceremony. Along with family members, Osbourne’s longtime guitarist, Zakk Wylde, was also in attendance and led the mournful procession.

Ozzy at Madison Square Garden in 2010. WireImage

“The day was incredibly emotional,” a source told the Sun at the time. “Pictures of Ozzy were dotted throughout the house and a photograph of him was given to everyone who attended to take home with them.”

One day prior, a funeral procession was held in the streets of Osbourne’s hometown of Birmingham, England.

Ozzy at the Alpine Valley Music Theater in 1982. Getty Images

His widow Sharon, 72, and their kids, Kelly, 40, Jack, 39, and Aimee, 41, along with Osbourne’s son Louis, 50, joined thousands of fans in the streets to say their goodbyes.

Ozzy in 2015. Jonathan Leibson

The former Black Sabbath frontman confirmed his Parkinson’s diagnosis in 2020. Osbourne had also undergone multiple surgeries in recent years.

Ozzy Osbourne Noah Calhoun/Startraksphoto.com

In 2018, Osbourne told the Guardian: “I’d like to be remembered for the work I did with Black Sabbath. I’m so proud of the music. But to be honest, just being remembered would be an achievement to me.”