“The Big Short,” a darkly comic look at the 2008 financial meltdown, won the Academy Award for best adapted screenplay for Charles Randolph and Adam McKay — who blasted banks and big oil in his acceptance.

“The Big Short,” based on the Michael Lewis book “The Big Short: Inside the Doomsday Machine,” won over scripts for “Brooklyn,” “Carol,” “The Martian” and “Room.” The announcement was the second of the Oscar telecast following original screenplay.

“Thank you to Paramount for making a movie about financial esoterica,” said McKay, who then made a political pitch.

“Don’t vote for candidates who take money from big banks, big oil or weirdo billionaires,” he added.

“Thank you so much to the Academy,” he said. “Also thank you to Michael Lewis for writing an amazing book. It inspired Charles and I so much. Thank you to my beautiful wife Shira Piven and my children, my two daughters Lili Rose and Pearl.”

“The Big Short” is also nominated for best picture, best director for McKay, best supporting actor for Christian Bale and best editing.

“The Big Short,” boasting a star-studded cast that included Bale, Steve Carell, Ryan Gosling and Brad Pitt, has been a frontrunner in the screenwriting category during awards season. It won the Producers Guild’s best feature award and the Writers Guild Award in the adapted category.

McKay and Randolph make extensive use of breaking the fourth wall as a way to engage the audience with unexpected appearances by Selena Gomez, Anthony Bourdain, Richard Thaler and Margot Robbie to explain details of the subprime mortgage collapse.

It was the first nomination for Randolph or McKay, who’s been konw director-producer of Will Ferrell comedies such as the “Anchorman” movies, “Step Brothers” and “The Other Guys” — which closed with extensive charts about the impact of the 2008 financial crisis.

“This was a really horrible tragedy,” McKay said of the 2008 financial crisis in his acceptance speech at the WGA Awards. “Millions of people lost their homes and millions of people lost their jobs.”

Paramount released “The Big Short” in December and has seen worldwide grosses hit $124 million.