Despite the critical acclaim he had in 2013, Eminem still wasn't sure whether Kendrick Lamar used a ghostwriter or not.

In fact, when he recruited Kendrick to be on the cut "Love Game," off The Marshall Mathers LP 2, he put the Compton rapper to the test to see if he wrote his own rhymes.

"Eminem heard that Kendrick Lamar was the best rapper, and he invited him to the studio to get him on a song," said pop singer Ed Sheeran on The Zach Sang Show. He was relaying a story that Rick Rubin told him, who executive produced The Marshall Mathers LP 2.

"He arrived and Kendrick came with all his mates," Sheeran continued. "And Eminem said 'I just want you in the studio, just you on your own and then my engineer is gonna come in and then record you doing it but your mates aren't allowed in."

Apparently, K Dot passed the test.

"Kendrick did it, wrote a sick verse and then everyone came in to listen to it," Sheeran explained. "Eminem said that he did it to test Kendrick, because he thought he had a ghostwriter. He then realized that he didn't, then claimed [Lamar] was the best."

Without a doubt, Sheeran's story has some validity, because the TDE spitter talked about that session with Eminem during an interview on an Australian radio show in 2014.

"He brought me out to Detroit, I had a show, and he brought me to the studio to do a hook," K Dot recalled. "Then I'm like, 'Alright. Cool. I'm finna dip.' Then he says, 'Think you could do a verse?' ... The thing with Em, which was crazy to me, is he kicks everybody out of the studio ... I took it as him kicking everybody out to see if it's really you writing those raps that you're writing."

You can listen to the pop singer's full interview below.

More From TheBoombox