Image copyright Getty Images Image caption Mudbound is Blige's first major film role

She wrote the theme tune, she sang the theme tune... she made Oscars history.

Mary J Blige has, rather surprisingly, become the first person ever to be nominated for an acting performance and an original song in a single year.

The R&B icon, who already has nine Grammy awards, stars as an impoverished farmer's wife in Mudbound, earning her a best supporting actress nomination.

Her theme, Mighty River, is a rallying cry against racial division, and a front-runner for the best song award.

In previous years, Oscar-nominated actors have performed songs in the best original song category - most recently Jennifer Hudson, for her Dreamgirls anthem Love You I Do - but the award itself is given to the songwriters.

Blige, who co-wrote Mighty River with Raphael Saadiq, therefore becomes the first person to score a double nomination.

Image copyright Pixar Image caption Pixar's Coco is also nominated in the best song category

However, the duo face stiff competition from the Oscar-winning composers of La La Land and Frozen.

Benj Pasek and Justin Paul, who won best original song for City Of Stars last year are nominated again for This Is Me, from The Greatest Showman.

Kristen Anderson-Lopez and Robert Lopez, who wrote Frozen's Let It Go, are nominated for Remember Me, from the Pixar animation Coco.

Here are the five songs in the running.

Remember Me (from Coco)

Animated films take years to reach the big screen. So long, in fact, that Remember Me was written in 2013 - shortly before husband-and-wife team Kristen Anderson-Lopez and Robert Lopez won their Oscars for Let It Go.

The song is central to Coco's story about honouring and remembering your family, and is performed in four distinct versions - from a crowd-pleasing mariachi rendition to a plaintive lullaby. that draws inspiration from The Beatles' Yesterday.

"At its core, its a message of goodbye," Kristen told Deadline. "This song can conjure up the singer after they say goodbye, and it can be taken many ways."

This Is Me (from The Greatest Showman)

The Greatest Showman tells the story of PT Barnum as he launches his famed Barnum & Bailey Circus with a cast of misfits and outcasts.

This Is Me is sung by bearded lady Lettie Lutz at a moment in the film where, derided as "freaks" and facing public protests, the circus performers find their inner strength.

"It's the moment where they realise, 'We are who we are, and we're going to own our own identity,'" Justin Paul told Variety magazine. "They march through the streets, through all the protestors, go back to their circus home and perform."

The stirring ballad has become the movie's break-out song, with 32 million Spotify streams propelling it into the UK Top 40.

Mystery of Love (from Call Me By Your Name)

The music of Sufjan Stevens suffuses Call Me By Your Name, the story of a young man finding love for the first time in 1980s Italy.

Film-maker Luca Guadagnino even asked the folk-rock musician to record a voice-over for the film. Stevens declined, but did agree to write new music for the film - something he'd resisted in the past.

"I'm always a little suspicious of the role of music in cinema," he told Deadline Hollywood. "But Luca is an exception, because he's one of those rare directors who uses music and sound so fiercely and with such mastery that you cannot imagine the films without the music."

Two of Stevens' songs were shortlisted for the Oscar, but it is Mystery of Love - which soundtracks to the Timothee Chalamet and Armie Hammer's budding romance - that makes the final cut.

Stand Up For Something (from Marshall)

Marshall sees Chadwick Boseman stepping into the role of civil rights hero Thurgood Marshall, who became the first African-American Supreme Court justice in US history.

The theme song was recorded by Common and Andra Day (who also appears in the film), and co-written by acclaimed songwriter Diane Warren.

To get into Marshall's mindset, Warren listened to Sam Cooke's Change Is Gonna Come and Curtis Mayfield's People Get Ready back to back; while Common partly wrote his verses as a reaction to the first weeks of Donald Trump's presidency.

The result is a song that pays tribute to Marhsall's achievements, while encouraging listeners to take a stand in the present day.

"And it doesn't have to be the community that you come from," Common told Billboard. "I can't only just stand up for black people.

"I'm not a woman but I care about women's rights and all this sexual harassment in Hollywood. It's tough times, and we're dealing with a lot. But we can overcome these things - it just takes us really looking out for each other to do it."

Mighty River (from Mudbound)

Mudbound is the story of two farming families in 1940s Mississippi, dealing with poverty, hardship and, in the case of the Jacksons, rampant racism.

Mary J Blige, who plays Jackson family matriarch Florence, also wrote the film's sombre theme song - but not until shooting had wrapped.

"I couldn't write while I was filming," she told Entertainment Weekly, but "after I saw it at Sundance, I was like, 'Okay, I gotta write a song for this!'"

The lyrics are a plea for understanding and reconciliation at a time of hate - giving them a chilling relevance in 2018.

"It's like, 'Come on, enough of this already! White flag in hand, I don't want to do this. I'm tired of doing this. Aren't you tired of doing this?'" said the singer.

Follow us on Facebook, on Twitter @BBCNewsEnts, or on Instagram at bbcnewsents. If you have a story suggestion email entertainment.news@bbc.co.uk.