Since NBC's Late Night with Jimmy Fallon launched in 2009, Elvis Costello has been a frequent guest. There, Costello got to work with the show's in-house band, The Roots, and he struck up a professional relationship with the its leader, Ahmir "?uestlove" Thompson.

That became a friendship — and that friendship eventually blossomed into a collaboration. But as ?uestlove tells it, the story behind Wise Up Ghost, a new album on which The Roots play backing band to Costello, is a little more sinister.

"Me and Steve Mandel did everything but plot a kidnapping and torture this record out of him," ?uestlove says, noting that he and Mandel — the band's recording engineer — had coveted working with Costello for years, but needed a way to catch his ear.

"When I did my initial interview with Lorne Michaels and Jimmy Fallon, and they were giving me scenarios of how this could be a good look for The Roots to take this late-night gig, one of the examples was, 'And Thursday nights, someone like Elvis Costello could come sit in.' So when I quoted that to Steve, the light bulb went off: 'Bing!'" ?uestlove says. "Once we got him on the radar, we had to reprogram ourselves to not geek out. ... We maintained our composure three times in a row, and then after the third appearance it was like, "OK. We got him."

Costello and ?uestlove both recently joined NPR's Arun Rath to discuss making Wise Up Ghost off the cuff — without even alerting a record label first — and the possibilities that emerge when songs are written in rehearsal. Hear more of their conversation at the audio link.