The most wide-open and contentious Oscars season in recent memory ended Sunday with the polarizing film Green Book winning Best Picture — a result that was immediately slammed on social media.

Directed by Peter Farrelly and starring Viggo Mortensen and Mahershala Ali (who won Best Supporting Actor on Sunday, the second time Ali has taken that award in three years), Green Book focuses on the friendship that emerges between an affluent and successful musician, Don Shirley (Ali), and his low-income driver and bodyguard, Tony Vallelonga (Mortensen), as the pair travel through the South in 1962. (The film's title comes from The Negro Motorist Green Book, a famous guide that helped black travelers find businesses that would accept their patronage during the Jim Crow era.) While initial reviews of the film out of the Toronto International Film Festival in September 2018 were positive — Green Book won the prestigious audience award in Toronto, considered a strong indicator of Best Picture bona fides — Green Book has been widely criticized for its simplistic depiction of race relations and for perpetuating a white savior myth. At one point in the film, Mortensen's Tony, who grew up in the Bronx, claims he's "blacker" than Ali's Don because he has better knowledge of the era's black musicians and enjoys eating fried chicken, among other things.

2019 Oscars: Full Coverage of the Academy Awards

Peter FarrellyPeter Farrelly

Its filmmakers also came under fire after it was revealed Shirley's relatives had major issues with the way Green Book presented the musician on-screen. "They decided to make Don Shirley estranged from his black family, though that was not true. They decided to make him absurdly disconnected from black community and culture, though that was not true. They decided to depict him as having spent his formative years in Europe, though he spent them in the Deep South where he was born and raised. They decided to create a story of a white man's redemption and self-realization using an extraordinary black life and a history of black oppression in this country as their backdrop. Many viewers are simply tired of that devaluing narrative," Yvonne Shirley, Don Shirley's great-niece, told The Hollywood Reporter earlier this year.

Previously, Don Shirley's brother, Maurice Shirley, also attacked Green Book, calling it a "symphony of lies." In response, Ali allegedly apologized to the Shirley family. "I got a call from Mahershala Ali, a very, very respectful phone call, from him personally. He called me and my Uncle Maurice in which he apologized profusely if there had been any offense," Edwin Shirley III, Don Shirley's nephew, told Shadow and Act. "What he said was, 'If I have offended you, I am so, so terribly sorry. I did the best I could with the material I had. I was not aware that there were close relatives with whom I could have consulted to add some nuance to the character.'"

Both Don Shirley and Vallelonga, whose nickname was Tony Lip, died in 2013. Vallelonga's son, Nick, co-wrote the film and won Best Original Screenplay on Sunday. But Nick Vallelonga also weathered controversy during awards season after an anti-Muslim tweet he posted in 2015 in response to then-presidential candidate Donald Trump resurfaced. "100 percent correct. Muslims in Jersey City cheering when [Twin Towers] went down [on Sept. 11, 2001]. I saw it, as you did, possibly on local CBS News." Nick Vallelonga deleted his Twitter account after the old tweet went viral and released a statement to apologize.

"I want to apologize. I spent my life trying to bring this story of overcoming differences and finding common ground to the screen, and I am incredibly sorry to everyone associated with Green Book," Vallelonga said. "I especially deeply apologize to the brilliant and kind Mahershala Ali, and all members of the Muslim faith, for the hurt I have caused."

Oscars 2019: The Full Winners List

Farrelly was also scrutinized after an old anecdote about how the director would expose himself to cast and crew, including Cameron Diaz before filming There's Something About Mary, resurfaced. "True. I was an idiot," Farrelly said in a statement to The Cut, which unearthed an old interview with Farrelly that included the penis flashing story. "I did this decades ago and I thought I was being funny and the truth is I'm embarrassed and it makes me cringe now. I'm deeply sorry."

<p>Mahersala Ali and Viggo Mortensen in <em>Green Book</em> </p>

Mahersala Ali and Viggo Mortensen in Green Book

Despite all that controversy, however, Green Book had numerous defenders — both inside the industry and at the box office. Audiences gave the film an A+ grade on CinemaScore, while legendary actor Harry Belafonte also endorsed the feature. "I knew Don Shirley, and, in fact, had an office across the street from his at Carnegie Hall, and I experienced much of what he did at the same time. This movie is accurate, it is true, and it's a wonderful movie that everyone should see," Belafonte wrote in an email to The Grapevine in November of last year. "The few people who appear to be objecting to the film's depiction of the time and the man are dead wrong, and, if the basis of their resentment stems from it having been written and/or directed by someone who isn't African American, I disagree with them even more. There are many perspectives from which to tell the same story and all can be true."

And for many, the same story was true on Sunday night, with the academy rewarding a movie about racial relations told from a white perspective, putting Green Book in league with prior Best Picture winners such as Driving Miss Daisy and Crash. Spike Lee, for one, was unhappy. The director, whose film BlacKkKlansman lost to Green Book, turned his back to the stage during the Green Book acceptance speeches. He later compared the Green Book win to a New York Knicks game. "I thought I was courtside at the Garden and the ref made a bad call," Lee joked backstage.

The legendary director won his first Oscar on Sunday night, for adapted screenplay, 30 years after his breakthrough film, Do the Right Thing, was infamously snubbed by the academy — which gave Driving Miss Daisy its Best Picture Oscar. "Every time somebody's driving somebody, I lose," Lee added. "But they changed the seating arrangement. But in '89 I didn't get nominated. This one, we did."

PHOTOS: 17 Times the Oscars Got It Wrong