"Where Is the Love" dominated radio airwaves for months and earned a Record of the Year Grammy nomination. But more importantly, it may have saved the Black Eyed Peas.

"Two and a half years ago, the Black Eyed Peas were about ready to hang it up," Ron Fair, who co-produced the song with the group's Will.I.Am, revealed. "They'd had two sort of critically acclaimed albums. They had songs like 'Weekends,' 'Joints and Jams' and 'Request + Line,' but none of them ever really connected. They were kind of in this rap netherworld and weren't able to cobble together either a huge hip-hop or pop following. There were maybe 100,000 devoted backpacker dudes in their dorm rooms supporting the Black Eyed Peas, but they weren't enough for them to make a living. The group was very despondent."

Fair, who produced Vanessa Carlton's Record of the Year-nominated "A Thousand Miles" and oversaw Christina Aguilera's Stripped, met Will when he recruited the Peas for the 'Legally Blonde' soundtrack, and the pair hit it off. "I said, 'Look, you're on Interscope, I'm president of A&M and we could switch you over to A&M,' " Fair recalled. " 'It's really the same company. The only difference is you get me. So let's put our heads together and try to make this thing work.' "

After they made the move, Fair said he posed a difficult question to the Peas. "I asked them, 'How would you feel about taking a leap and going more into the pop world?' They replied, 'We don't want to lose our credibility or our fanbase.' I said, 'Well, if you don't take a shot at it, it's gonna get worse, because the backpack crowd are the people who will download the records for free.' "

That grabbed the Peas' attention, so Will asked what Fair had in mind. "I thought, OK, I'll run the risk of them thinking I'm the corporate record-company pig or some kind of sell-out a--hole. And literally off the top of my head I said, 'Why don't you do a song with somebody like, uh, Justin Timberlake?' Justin hadn't done his solo album yet. They said, 'Really? We know that guy, he's our friend. Whenever he comes to town, we roll, we dance, we party, we hang out.' "

Fair gave the group specific directions: "Find him. Keep me out of it. Keep your manager out of it. Keep his manager out of it. Keep everybody in the business out of it. Just go make a song with him and see what happens. No strings attached."

On the night after Christmas in 2001, Will came up with a beat and wrote a guitar part he liked. He then got some socially conscious thoughts off his chest he'd been holding in since September 11, including the verse, "Overseas we tryin' to stop terrorism/ But we still got terrorists here livin'/ In the U.S.A., the big CIA, the Bloods and the Crips and the KKK/ But if you only have love for your own race/ Then you only leave space to discriminate." Apl.De.Ap and Taboo added similar emotionally charged verses.

Will later called the song "a tear-jerker." "It's like if Marvin Gaye was alive today," he said. "It's classic soul, some thinking sh--. ... The world needs this song right now. There's no song like that in urban music, pop music. We're saying some pretty deep stuff, some conscious stuff."

Timberlake had never touched anything like it, but Will had a hunch he might like it and was right.

"I remember when he played me the track on the phone, I had already started hearing a melody," Justin said last year. "It was just one of those [instances of] creative people working together [and it] just worked out."

The words "Where is the love" were stuck in his head, and Timberlake wrote the song's chorus within 15 minutes. He sang it for Will on his voicemail and before he knew it was in Los Angeles recording the vocals.

There was only one problem. "It wasn't very good," Fair admitted. "It really needed a lot of attention. Will tends to make records very quickly, on the fly, with a lot of heart. He cops a vibe and then moves on. So about a year into [working on] the Black Eyed Peas album, I asked him, 'Can I fool around with it?' He goes, 'What do you mean?' And I said, 'Let me do my thing on it. If you don't like it, you can trash it.' "

Will obliged. "I went in with my crew and we spent 14 days on the record," Fair said. "We re-edited Justin's vocal. We put [new Peas female singer] Fergi on it. I wrote the string part and recorded the strings. We took things from the third verse and put them in the first verse. We basically buffed it and made it a lot more powerful and concise."

Fair's string arrangement, based on the original guitar and bass parts, made a dramatic difference in the song, but Will liked parts of it and hated others.

"He kind of added another layer of salt and pepper to make it less glitzy and return the balance it struck," Fair said. "It's a mixture of a lot of things. It's a hip-hop record, a pop record, a sing-song kind of nursery-rhyme record and a soulful record. And it's certainly a message record."

The Peas planned to release "Shut Up" as the first single from Elephunk, but everyone agreed "Where Is the Love" was too strong to be just an album track. "The decision made itself," Fair said.

There was another problem, though. Timberlake was promoting Justified by then, and his record label thought another single might deflect attention from his own song.

"So Jive Records said, 'You can use the record, but you can't say it features Justin. We don't want Justin in the video. Just let it be a record,' " Fair said. "That ended up working very favorably, because it made kids feel like they had something they maybe weren't supposed to have."

When "Where Is the Love" was finally released, Black Eyed Peas were actually touring with Timberlake, so he often performed it with them. In the end, the song helped sell nearly 5 million copies worldwide of Elephunk.

"It's actually one of the biggest records of all time in terms of its radio spins," Fair said. "Will's fears about losing credibility and his audience base worked in reverse. He actually gained credibility, and people realized what a talented heavyweight he is. He's on his way to becoming the next Pharrell or Outkast. The whole thing is just a giant miracle."

MTV's live Grammy coverage kicks off at 7 p.m. ET on Sunday with "Backstage at the Grammys," then check in with MTVNews.com throughout the night for analysis, insight and up-to-the-minute coverage.VH1's live Grammy coverage kicks off at 7 p.m. ET on Sunday with "Backstage at the Grammys," then check in with VH1.com throughout the night for analysis, insight and up-to-the-minute coverage.

For more Grammy news, check out the MTV News Grammy Archive.

Check out the story behind each of the Record of the Year nominees: