RATING |

In The Last Black Man in San Francisco, a displaced resident makes a sort of spiritual claim on a home no longer legally in his family.

Jimmie (Jimmie Fails) knows that his father lost the family home years ago, but he can’t stand to see the venerable Victorian neglected, so when the owners are out shopping, he jumps the fence to paint the trim (he likes periwinkle), and water the neglected garden.

It’s a benign form of trespassing, but the legal occupants don’t see it that way, and pelt Jimmie with farm-market produce until he leaves. Then, fate intervenes — the owners are themselves cast out while an estate dispute works its way through the courts. So Jimmie moves in, exercising the lien of love he’s placed on the house. Or, as the Realtor puts it, squatting.

This is obviously, on one level, a movie about gentrification in the famously, ruthlessly gentrified San Francisco, but there is a lot going on this movie — a DIY, (initially) crowdfunded enterprise made by locals. Fails is a nonprofessional and a native, the movie is written and directed by his childhood friend Joe Talbot.

They invest the movie with themes about the way young men (most of the characters are African American) engage in theatrical rituals of macho challenges, mostly harmless, often funny but sometimes deadly — teased out by a subplot built around Jimmie’s friend Mont (Jonathan Majors), a budding playwright.

Mont sees around him a community of performances and characters, and in his best friend Jimmie, maybe a guy whose obsessive connection to the house, and to his family history, is it’s own kind of drama — a story that creates the only version of the past that Jimmie is willing to live with.

There are signs throughout that Jimmie’s squatter’s campaign will not end well — some planted with subtlety and humor. Jimmie and Mont watch old movies with the latter’s father, and there is a pointed reference to Edmond O’Brien and D.O.A., about a man investigating his own murder. Jimmy, too, seems to be on borrowed time.

Talbot is a rookie director but a movie buff — his grandfather was friends with Ed Wood and appeared in Plan 9 From Outer Space. Talbot is a better director than Wood. He lavishes attention on the city’s less fashionable precincts. Sometimes it’s showy, but more often the shots are appropriate and evocative, and he does a lot with a little.

And the movie simply has the best use of music (Talbot is also a musician) that I’ve seen this year, starting with a gorgeous score by Daniel Herskedal , and embellished with the smart, eclectic use of songs that speak to the city’s cultural history — remix of a Jefferson Airplane tune, a Joni Mitchell standard, and a complete reinvigoration (via Michael Marshall) of the ’67 hit “San Francisco (Be Sure to Wear Flowers in Your Hair)” that’s so beautiful the song feels like it has an entirely new life.

Which, for better or for worse, is also true of the city Talbot loves.

Note to fans of The Dead Kennedys: That’s Jello Biafra on the Segway scooter, giving the tour.

RATING |

The Last Black Man in San Francisco. With Jimmie Fails, Jonathan Majors, Danny Glover, Rob Morgan, Mike Epps, Finn Wittrock, Jello Biafra. Distributed by A24.

Running time: 2 hours

Parents’ guide: R (language)

Playing at: Area theaters