Moonlight has beaten Oscars favourite La La Land to win the top honour at a politically-charged Writers Guild of America (WGA) Awards.
The film’s writer and director Barry Jenkins won best original screenplay for the drama about a young gay black man coming of age in Miami.
He beat Damien Chazelle’s musical La La Land – which is widely tipped for Oscar success later this month – as well as Manchester By The Sea, Loving and Hell Or High Water.
Accepting his award at the ceremony in Los Angeles, Barry said: “I can’t say writing will get you on this stage but it will bring you close to the world. (This award) means the world to me.”
The Academy Awards ruled Moonlight to be ineligible for best original screenplay because it is based on a stage play called In Moonlight Black Boys Look Blue.
Instead, Barry is nominated for the Oscar for best adapted screenplay at the ceremony on February 26.
Sci-fi drama Arrival won best adapted screenplay at the WGA Awards, beating Deadpool, Fences, Hidden Figures and Nocturnal Animals.
The ceremony at the Beverly Hilton Hotel included a number of references to Donald Trump, with an impersonator of the US president taking to the stage and two men dressed as Russian soldiers handing out awards.
But Oscar-winning film-maker Oliver Stone warned it had been become “fashionable” to criticise Mr Trump as he received the Laurel Award for screen-writing achievement.
Accepting his award, the Platoon director said he wanted to remind writers that “you can be critical of your government and your society”.
“You don’t have to fit in,” he said.
“It’s fashionable now to take shots at Republicans and Trump and all that, and avoid the Obamas and Clintons.
“In the 13 wars we’ve started in the last 30 years and the 14 trillion dollars we’ve spent and the hundreds of thousands of lives perished from this earth, remember it wasn’t one leader. It’s a system, both Republican and Democrat.
“In the end, it’s become a system leading to the death of this planet and the extinction of us all.”
Aaron Sorkin, the creator of The West Wing and The Newsroom, criticised Mr Trump as he accepted the Paddy Chayefsky Laurel Award for television writing achievement.
“We’ve been told that as coastal elites we’re something less than real Americans and that we’re out of touch,” Aaron said on stage.
“If you find it mind boggling that living and working in the two largest cities in America makes you less than a real American, you’re not the one who’s out of touch.
“If you don’t think that turning away people who are seeking a safe haven from unspeakable brutality is a morally defensible idea, then you’re not the one who’s less than a real American.”
British film-maker Richard Curtis, whose movies include Four Weddings And A Funeral, Love Actually and Bridget Jones’s Diary, received the Valentine Davies Award for humanitarian service.
On stage, the Comic Relief co-founder urged those involved in the film and television industry to use their influence to raise money for charity.
“It’s not always easy,” Richard said. “You’ll find yourself compromised and it’s complicated but then so is everything we all do.”
After he was presented with his award by actor Jeff Goldblum, Richard added: “If Hugh Grant had been anything like him, I’d have had such a happy life.”
Atlanta won WGA awards for best new series and best comedy series, while The Americans was named best drama series.
American Crime Story: The People vs OJ Simpson took home the award for best long form adapted series.
Last Week Tonight with John Oliver won best comedy/variety show, while Saturday Night Live was named best variety sketch show.