Spike Lee celebrated winning his first non-honorary Oscar in his long career as a film-maker with an explicitly political speech, during which he called on the audience to “regain our humanity” at the next US election.

“Before the world tonight, I give praise to my ancestors who built our country, along with the genocide of our native people,” Lee said. “When we regain our humanity it will be a powerful moment … The 2020 election is around the corner – let’s all mobilise and be on the right side of history. Make the moral choice between love versus hate.”

Lee was accepting the award for best adapted screenplay for his film BlacKkKlansman, with co-writers David Rabinowitz, Charlie Wachtel and Kevin Willmott. It is a satirical film loosely based on a true story about a black police officer who infiltrated the Ku Klux Klan by using a white, Jewish proxy.

The film explores how racism has remained in America’s bloodstream since slavery and how it has erupted into the mainstream with the election of Donald Trump. BlacKkKlansman concludes with footage from Charlottesville, where Heather Heyer was killed by a car driven into a crowd protesting against a “unite the right” rally of white supremacists.

Spike Lee jumps into Samuel L Jackson’s arms at the 91st Academy Awards. Photograph: Rob Latour/REX/Shutterstock

It was Lee’s first Oscar win, not counting an honorary award he received from the Academy in 2015. The prize was presented by Samuel L Jackson – an elated Lee jumped into his arms before shouting “Do not turn that motherfucking clock on!” to the Oscars producers who he thought might curtail his speech.

Lee began his speech by saying: “For 400 years, our ancestors were stolen from Africa and brought to Virginia and enslaved. They worked the land from ‘can’t see’ in the morning to ‘can’t see’ at night. My grandmother – who lived 100 years young, a college graduate even though her mother was a slave – my grandmother, who saved 50 years’ of Social Security checks to put me through college. She called me Spiky-poo …” Lee said that his grandmother had put him through film school.

Lee’s lack of Oscars recognition has long been noted. Do the Right Thing, about racial tensions in New York, was controversially snubbed at the 1990 Oscars in favour of Driving Miss Daisy, a fact that Lee alluded to when concluding his speech: “Let’s do the right thing – you know I had to get that in there!”

Lee was also wearing Love and Hate rings, worn by the Do the Right Thing character Radio Raheem, and a purple suit in tribute to Prince. A Prince cover of Mary Don’t You Weep plays over the credits of BlackKklansman.