Songwriter Diane Warren has told how a chance encounter with rapper Common on a plane led to them collaborating on an Oscar-nominated track.

Warren, who has worked with stars such as Lady Gaga and Beyonce, hopes her ninth Academy Award nomination will bring her first victory with the song Stand Up for Something from the movie Marshall.

She envisioned a rap would fit perfectly on the song, sung by Andra Day, and said she had suggested Common for the task.

Warren said that a week after the suggestion she was travelling first class on the way to the Sundance Film Festival last year when she bumped into the hip-hop artist.

“I sang it to him – horribly sung, I’m not really a singer – but I sang it and he loved it. He said, ‘Just send me the song as soon as we land’,” Warren said.

Warren and Common are up for best original song for the track that features in the film about Thurgood Marshall, the US Supreme Court’s first black justice.

Her nine nominations have come over a 30-year span but this one, she said, is for her “most important” song because it is a “call for action”.

The American, 61, added: “Especially with what’s going on right now in our country, we need to stand up. Every minute it feels like there’s some other rights of ours being trampled on.”

The 90th Academy Awards will be held at Hollywood’s Dolby Theatre on March 4.