“He agonized over this for two weeks,” Grammy Awards executive producer Ken Ehrlich told the Star Tribune.

– I said some of those songs shouldn’t be done by anyone but Prince,” Ehrlich continued.

Mars settled on “Let’s Go Crazy” from Prince's breakthrough movie “Purple Rain.” But the tribute wasn’t limited to Mars going crazy with his band; it started with the Time, the hit-making Minneapolis band Prince put together around singer Morris Day in 1981, doing an abbreviated medley of two of their hits from "Purple Rain."

Grammys host James Corden set the table by asking the audience to imagine a purple sky over First Avenue, the Minneapolis club where the movie's musical scenes were shot. The Time whipped through “Jungle Love” and “The Bird” with Grammy-goers dancing the same steps Day was doing onstage.

Then Prince’s voice was heard talking the intro to “Let’s Go Crazy” while his symbol flashed on the screen. Mars, resplendent in a purple sequined jacket and ruffled shirt, commanded the stage on vocals and guitar.

“Bruno ripped it up,” Day said backstage afterward. “I don’t think there’s another artist who could pull it off as perfectly with us.”

Interjected Time keyboardist Jimmy Jam: “We still kicked his ass.”

There was no question that the Grammys were going to honor Prince on Sunday. There were months of planning, complicated by the uncertainty of Prince’s estate and just how to salute Prince on music’s biggest night.

After Prince died on April 21, Recording Academy president and CEO Neil Portnow began plotting. He considered a full-on all-star TV special, like the ones the Grammys have been taping a day or two after the awards the last few years honoring Stevie Wonder, the Beatles and Frank Sinatra. On Tuesday, the Grammys will record a salute to the Bee Gees featuring Keith Urban, Demi Lovato, John Legend and others.

Portnow soon realized that Prince’s affairs were not in order and dealing with his estate would not be easy. So he refocused his sights on a tribute segment on the Grammy Awards. In December, he consulted with producer Jam, a longtime member of the Grammys TV committee and an ex-Prince associate.

“I gave Neil a broad stroke answer and said I think it needs to include people who were associated with Prince. Whether it was the Revolution, New Power Generation or whoever,” Jam, a keyboardist in the original Time, told the Star Tribune before Sunday’s ceremonies.

– Bruno Mars.

Was he the only person the Grammys contacted?

“He was absolutely at the top of our list,” said Portnow.

Mars told Jam that he would not do it without the original members of the Time, who last worked together in 2011 and performed on the Grammys in 2009 with Rihanna. So the producer put Mars on the phone with Day for a “mutual admiration talk.”

“Bruno has been very generous in acknowledging what we’ve [the Time] done and our influence on him,” Jam said. “I think Bruno feels like Prince is unattainable to him, but we’re the attainable and the inspirational for him. Because he knows he can act a fool like us onstage.”

At Mars’ suggestion, a concept was hatched for a vibe recreating the early 1980s, when the Time opened for Prince in concert. The Time would play, then Mars would do his 2015 hit “Uptown Funk,” which evokes a Time groove, and finally some other stars would sing Prince material with him and the Time.

But plans for the Grammy show are fluid, and the Prince tribute was trimmed to a 3-minute Time medley followed by a few minutes of Mars with his band.

Time guitarist Jesse Johnson was disappointed that his band didn’t get more time to update the arrangements to “Jungle Love” and “The Bird” by adding some more funk.

But Day was pleased. “It was a double-edged for me,” he said afterward. “I hate the reason why we’re here. But I think it’s fitting that we are here.”

Delicate balance

– and how – is a challenge that Grammys officials face annually, and increasingly so. In each of the last three years, about 600 noteworthy musicians and industry types have died. All the names appear on grammy.org and in the program for those at Staples Center. But there is a process for whose name ends up on TV.

In mid-December, Ehrlich starts planning the Grammys’ televised in memoriam segment, which will feature about 50 names. He also plots which musical giants will likely be the subject of an all-star tribute during the 3½-hour telecast.

Since the 2016 Grammys broadcast, such big names as Merle Haggard, Leonard Cohen, Leon Russell, George Michael, Sir George Martin, Ralph Stanley and Prince died. Grammy-winning jazz-soul singer Al Jarreau passed away Sunday morning. Only Prince and Michael received major salutes on Sunday.

“It’s all part of a delicate balance,” Portnow explained. “There are no rules or regulations.”

The Grammys’ primary mission is to celebrate the year in music, he said, and ultimately to entertain viewers. But honoring deceased heroes has become part of the formula.

Last year, the Grammys staged special performances for David Bowie (featuring Lady Gaga), the Eagles’ Glenn Frey (the surviving Eagles with Jackson Browne), Earth, Wind & Fire’s Maurice White (Stevie Wonder and Pentatonix), all of whom died in early 2016, as well as B.B. King (Bonnie Raitt, Gary Clark Jr. and Chris Stapleton).

Probably the Grammys’ most unforgettable tribute was in 2012 after Whitney Houston had died the night before the ceremony. Jennifer Hudson opened the telecast with a stirring solo rendition of the Houston hit “I Will Always Love You.”

Limited time

Ehrlich said the Grammys reached out to Prince’s estate out of courtesy and for rights obligations. But his people were not consulted about the artists involved, though some family members were expected to attend the Grammys.

One longstanding legal issue with Prince was avoided. While the original members of the Time were not allowed by Prince to use their moniker when they made a new album in 2011 (as the Original 7ven), they said he was OK with them being “the Time” when doing old material, guitarist Johnson explained.

Preparing for the Grammys, the Time had only three rehearsals, starting with a four-hour session on Thursday night in Los Angeles when Jam outlined what the mission was. The group played for nearly two hours Saturday afternoon at Staples Center in front of the television producers, directors and crew. Then, after arriving at the arena at 10 a.m. on Sunday, there was a dress rehearsal prior to the 5 p.m. telecast.

Meanwhile, Day decided to pay his own personal tribute to Prince. Over the weekend, the singer released a solo single called “Over That Rainbow.” This time he collaborated with another music icon, Snoop Dogg.