Rapper Rick Ross has his pal Jamie Foxx to thank for helping him land a spot on the Django Unchained soundtrack because it was the singer/actor who came up with the song.

The hip-hop star's 100 Black Coffins has been shortlisted for the Best Song award at the 2013 Oscars, but Foxx is claiming all the credit.

The Academy Award winner reveals he introduced Ross to Quentin Tarantino and the pair immediately hit it off, so Foxx suggested the director consider using original music for the western - a first for the filmmaker - and hire the rapper for the job.

Both parties expressed interest in the idea, but it was the Ray star who took it upon himself to get started on the song - and even recorded an example of Ross' vocals to show Tarantino.

He explains, "I mimicked Rick Ross' voice on the track, drove the track to Quentin Tarantino - because he doesn't like computer stuff (emails) - and let him hear it, then I drive over to Rick Ross' hotel and say, 'Come downstairs' at 4am and 'Hear this'."

Foxx convinced the musician the tune would be Oscar-worthy and he made Ross come up with his lyrics without even seeing the drama, about a freed slave out for revenge against an evil plantation owner to reclaim his wife.

He tells MTV.com, "Rick does the first verse and I say, 'You have to do the whole song because in order for us to turn it in, it has to just be you,' and he says 'Well, I haven't seen the movie.' I said, 'Well, no one has, but write from (the point of view that) someone took your girl or someone did something bad to your mum', and the second verse he wrote... when people hear it, tears come to their eyes."

Ross' 100 Black Coffins isn't the only Django Unchained track to make the Oscars shortlist - R&B star John Legend's Freedom is also under consideration.