The screenwriter behind the brand new film, “The Hate U Give” died following a years-long battle with cancer a day before the movie’s release. She was 58.

Audrey Wells succumbed to her illness on Thursday, according to

“Over the last five and half years, Audrey fought valiantly against her illness and she died surrounded by love. Even during her fight, she never stopped living, working or traveling and she never lost her joy, wonder and optimism,” her husband, Brian, said in a statement.

“She was simply the most incredible wife and partner imaginable, and she knew always that she was loved.”

The San Francisco native wrote and directed the 1999 film “Guinevere” and the Diane Lane movie “Under the Tuscan Son.”

Wells penned the script for the film adaptation of the “Hate U Give,” which is based on the popular book by Angie Thomas about a black teenager — played by Amandla Stenberg — whose world gets turned upside down when she witnesses one of her childhood friends get killed by a police officer.

The movie got a limited release on Friday and goes nationwide on Oct. 19.

One of her last films to hit the big screen was “A Dog’s Purpose,” which she wrote.

Wells is also survived by her daughter, Tatiana.