Ed Sheeran wrote and recorded his collaboration with Eminem at Russell Crowe's house.

The Shape of You hitmaker appears the track River on the Lose Yourself rapper's new album Revival, and he reveals he was travelling in Australia when he was contacted by Eminem's manager, Paul Rosenberg, about a possible collaboration.

The actor had previously offered up his home as a place for Ed to stay, revealing it was equipped with a recording studio, so the Brit took him up on the offer and quickly got to work on the track.

"I used the studio at Russell's house... played the drums on it, and then played the guitar, and then recorded the thing and wrote the chorus and did the piano on it, and then sent it off and then didn't hear anything back," he tells Billboard. "This was, like, March, 2016."

Sheeran didn't hear anything about the song for another year until he was contacted by a friend, who frequently works with Eminem, telling him the song was coming together. Sheeran then got to meet the rapper when he was performing in Detroit, Michigan.

"(He's) such a sweet, talented guy," Sheeran adds. "(The experience was) a door that I thought was closed and just opened randomly."

Sheeran has been a longtime fan of Eminem's and earlier this year (17) he revealed he cured his childhood stammer by rapping to his third album, The Marshall Mathers LP.

"My parents didn't know the content of the album, and I must have been nine when it came out," he told U.K. radio show Desert Island Discs. "And when you're nine and someone is saying rude stuff, you wanna learn it. So I learned all of the album back-to-back and he raps at such a fast pace that my stammer would go when I rapped."