It wasn't too long ago that it looked as if "Deadpool" might have an outside shot at Oscar gold, but instead it was "Suicide Squad" that walked away Sunday night with an Academy Award.

The critically panned but commercially successful Warner Bros. film won the trophy for Best Makeup and Hairstyling, beating out "A Man Called Ove" and "Star Trek Beyond" at the 89th Academy Awards.

RELATED: Can “Deadpool” Break the Superhero Movie Oscar Curse?

It's the first release from the fledgling DC Extended Universe to receive an Oscar, although earlier films based on DC Comics haven been honored by the Academy (most recently, "The Dark Knight" was recognized for Best Editing, with Heath Ledger recognized posthumously as Best Supporting Actor).

"Deadpool" had been named in December among the seven finalists in the 35-year-old category, but didn't make the final cut last month.

Written and directed by David Ayer, "Suicide Squad" grossed $745.6 million worldwide, but earned only a 26-percent "fresh rating" on Rotten Tomatoes; audiences seemed almost evenly split. Still, the film performed well enough for Warner Bros. to move forward with a sequel, with Mel Gibson being eyed to direct, and a spinoff, "Gotham City Sirens," led by Margot Robbie as Harley Quinn.

Congratulations to my amazing and talented make-up and hair team on Suicide Squad! #Oscars— David Ayer (@DavidAyerMovies) February 27, 2017

"Suicide Squad" stars Will Smith, Jared Leto, Margot Robbie, Joel Kinnaman, Viola Davis, Jai Courtney, Jay Hernandez, Adewale Akinnuoye-Agbaje, Ike Barinholtz, Scott Eastwood and Cara Delevingne.