Barry Jenkins’ script for coming-of-age story “Moonlight” won the Writers Guild of America award for best original screenplay and Eric Heisserer’s script for science-fiction saga “Arrival” won for best adapted screenplay.

FX swept the major TV awards as “Atlanta” won best new series and top comedy series while “The Americans” won drama series. The network’s “American Crime Story: The People vs. O.J. Simpson” took the adapted longform trophy.

“Moonlight” — a searing tale in three sections of a boy, teenager and man coming of age in 1990s Miami — topped Taylor Sheridan’s “Hell or High Water,” Damien Chazelle’s “La La Land,” Jeff Nichols’ “Loving” and Kenneth Lonergan’s “Manchester by the Sea.” It was based on a story by Tarell Alvin McCraney.

“A lot of people back home are watching this and they see me doing these things and they get inspired,” Jenkins said. “I can’t say that writing will get you from where you are to this stage, but my experience is that it will get you closer to who you are.”

“Arrival” — focusing on non-verbal aliens arriving on the planet Earth — was based on “Story of Your Life” by Ted Chiang. It topped Rhett Reese and Paul Wernick’s script for “Deadpool,” August Wilson’s “Fences,” Allison Schroeder and Theodore Melfi’s “Hidden Figures,” and Tom Ford’s “Nocturnal Animals.”

“This confirms a long-held suspicion of mine that you all are sci-fi nerds,” Heisserer said in his acceptance in Beverly Hills. “Stay curious. Ask critical questions. It’s how great stories happen and how science prevails.”

The WGA Awards have a reliable track record of predicting the Oscar winners — which have matched in 16 of the last 22 years in adapted and 14 of the last 22 in original, including last year’s winners “The Big Short” and “Spotlight.” The Academy of Motion Picture Arts and Sciences has placed “Moonlight” in the original category, where it is competing on Feb. 26 against “Arrival,” “Fences,” “Hidden Figures” and “Lion.”

“The Americans” award went to Peter Ackerman, Tanya Barfield, Joshua Brand, Joel Fields, Stephen Schiff, Joe Weisberg and Tracey Scott Wilson. The winning “Atlanta” writers were Donald Glover, Stephen Glover, Jamal Olori, Stefani Robinson and Paul Simms.

Exec producer Simms accepted the comedy series award at the New York ceremonies and said Glover — who also stars — was working in London. “If he were here, I think he would thank Tina Fey and Robert Carlock for giving him his first writing job on ’30 Rock,’ ” Sims said.

Stephen Glover said in Beverly Hills after the first award, “Thank you to the Writers Guild for giving me health insurance and thank you ‘Black-ish’ for not being nominated.” On winning the second, he said, “Now I’m already jaded.”

Robert Carlock won the award for best TV comedy series episode for “Unbreakable Kimmy Schmidt” for the “Kimmy Goes on a Playdate” script. Vera Herbert won the WGA Award for best TV drama series episode for “The Trip” episode of NBC’s “This is Us.” “Triumph’s Election Special” took the comedy /variety special award.

Susannah Grant won the original longform TV award for HBO’s Anita Hill drama “Confirmation.” She was also honored with the WGA’s Paul Selvin Award, given for embodying the spirit of the constitutional and civil rights and liberties.

Writers for “American Crime Story: The People vs. O.J. Simpson,” were Scott Alexander, Joe Robert Cole, D.V. DeVincentis, Maya Forbes, Larry Karaszewski, Wally Wolodarsky. It was based on the book “The Run of His Life” by Jeffrey Toobin.

The animation trophy went to Joe Lawson for “BoJack Horseman” for the “Stop the Presses” segment. He said the award should have gone to the nominated “Fish Out of Water” segment of the series. “Best f—— thing I’ve ever seen,” he added.

“Command and Control” won the feature documentary award for the script by Robert Kenner and Eric Schlosser, story by Brian Pearle and Kim Roberts.

“Last Week Tonight with John Oliver” won the comedy/variety (including talk) series award. “Saturday Night Live” won the comedy/variety (including sketch) trophy.

The WGA announced the winners of its 69th annual awards on Sunday in simultaneous ceremonies at the Edison Ballroom in New York City and the Beverly Hills Hilton in Beverly Hills.

Patton Oswalt hosted the Beverly Hills ceremonies and evoked laughs with several quips about President Donald Trump, inlcuding, “I feel bad for Trump…his life before this was golf and hookers and jets.”