The news hit Twitter Thursday just before 1 p.m. EDT, when TMZ tweeted out the information that the artist Prince had died at his Paisley Park home in Minnesota.

While other media outlets scrambled to confirm the news, a different scramble was taking place at MTV headquarters. The newly reinvigorated MTV News team dove into the video vault as soon as the story broke, pulling all the Prince material it could find. By 2 p.m., the network was running a Prince takeover that would last until 6 a.m. the following day, a marathon of music videos, performances and clips of Prince appearances on the network.

The decision-making chain that goes along with shifting a network’s entire schedule can be dense, involving dozens of conversations that can sometimes take hours or even days. But the entirety of MTV’s executive staff happened to be in one room at the time — they were mere hours away from making their annual so-called upfront pitch to advertisers. The first thing the gathered executives did was give the directive to turn the network’s logo purple.

They then turned their attention to a bigger tribute. “We had the ability to flip the schedule in real time,” says Erik Flannigan, executive vice president of music and multiplatform strategy for the Viacom Music and Entertainment Group that encompasses MTV. “We said: ‘All right, how fast can we get those videos up? What’s on the schedule tonight — is ‘Purple Rain’ cleared? Please, please, please, we hope someone has it.’” Within 20 minutes, they’d confirmed that the parent company Viacom did indeed have the airing rights to the film starring Prince and that, in fact, MTV Live had run the 1984 cult classic a mere two days before. The network even pulled a new episode of “The Real World” to air the movie twice.

“Purple Rain” wasn’t available through any of the streaming services, while Prince’s music was available to stream only on Tidal, and the artist had famously removed all video clips from YouTube. “People needed it, we had it. We were the ones who were with Prince every step of the way in the ’80s and ’90s and through the 2000s,” Flannigan says.

“Were we a bit fortunate, having the rights to everything? Sure,” he says. “But we did it because we can, and because we needed to, and because it was the right thing to do. Prince is universal.”