Long before each came away with an Academy Award, “12 Years a Slave” director Steve McQueen and screenwriter John Ridley were embroiled in a bitter feud regarding credit for the film’s Oscar-winning screenplay, a fight they kept quiet for the good of the campaign before it came to a head Sunday night at the Dolby Theatre.

Ridley turned down McQueen’s request for shared screenplay credit, TheWrap has learned. He won the Oscar for Best Adapted Screenplay on Sunday and did not thank the director in his acceptance speech, striding past him on his way to the podium but pausing to hug director David O. Russell. Some observers interpreted McQueen’s unsmiling applause as half-hearted 

McQueen later took the microphone at the end of the evening when “12 Years a Slave” won Best Picture, and made no mention of the writer. While McQueen lost the Best Director award to Alfonso Cuaron (“Gravity”), he was one of five producers to win Best Picture for “Slave” along with Brad Pitt, Dede Gardner, Jeremy Kleiner and Anthony Katagas.

McQueen tapped Ridley to work on a separate slavery-themed project that eventually led to “12 Years a Slave” after McQueen’s wife discovered the book, which Ridley subsequently agreed to adapt on spec. McQueen had a hand in shaping the script that Ridley turned in, but when he asked the writer for shared credit — not uncommon in Hollywood — Ridley politely declined, an individual with knowledge of the situation told TheWrap.

McQueen was nonplussed and appealed to Fox Searchlight, which ultimately sided with Ridley. Brad Pitt, who produced “Slave” and plays a small role in the film, was even forced to step in at one point and mediate. (It didn’t help that Pitt was also in the midst of a PR battle with Paramount over the fact that his company Plan B, based at the studio at the time, failed to offer it a chance to finance and distribute “12 Years a Slave” before taking the project to New Regency.)

McQueen begrudgingly agreed to hold his tongue for the sake of the movie. He, Ridley, Pitt and Fox Searchlight executives all knew what was at stake — and how easily a Best Picture win could slip through their fingers if public discord leaked to the media.

Their silence proved to be a wise decision: The slavery drama ended up winning three Oscars, including Best Picture, which McQueen accepted as a producer; and adapted screenplay, which Ridley accepted on his own behalf.