Almost 80 years ago, George Balanchine arrived in the United States a young Russian-trained choreographer and created an American ballet style through a new American ballet company, New York City Ballet. As another Russian, Sergey Brin, altered the way we think of information through the search engine Google, Balanchine changed our relation to dance by injecting imperial ballet with the asymmetries and syncopations of American jazz, nightclub moves, Broadway hoofing and chorus lines.

Thursday in an uneven but important all-Balanchine program from San Francisco Ballet at War Memorial Opera House, “The Four Temperaments,” from 1946, rose above the other two works to once again reveal that, performed well, Balanchine’s dances are sublime studies of beauty, spiritual longing and poise. This one, in particular, feels like a medieval passion play yanked into the 20th century. It is aerodynamic, cheeky and austere.

Dedicated to the four medieval humors of the body (melancholic, sanguine, phlegmatic and choleric), and set to a demanding score by composer Paul Hindemith, “Four Temperaments” combines technical prowess with vernacular movement like Lindy hop, hoofing and Apache dancing. If that weren’t enough, it inserts elements of early German modern dance into the work alongside fiercely crisp classical leaps, turns and beats.

It also calls for a lanky species of dancers: Legs have to operate like can openers while supple enough to turn bodies inside out, thrust pelvises forward menacingly and lunge with the swiftness of big cats. Without fail, this group triumphed, including corps members Kimberly Braylock, Jennifer Stahl, WaTing Zhao, Quin Wharton and Daniel Deivison.

The soloists, meanwhile, performed like lords of their universes. Taras Domitro as Melancholic moved like melting glass — heavy, molten and translucent. Sarah Van Patten as Sanguinic was an implacable goddess by way of some upper class nightclub, and Tiit Helmits was her devoted young god. Sofiane Sylvie brought dense, daunting geometry to Choleric, giving anger palpable mass and form, while Vito Mazzeo as Phlegmatic floated and drooped like ambivalence itself.

“Divertimento No. 15” and “Scotch Symphony” prepared us for this particularly astringent modernism by cooking 19th- century classicism down to its fundamentals. “Divertimento” was buoyed by Mozart’s glorious chamber music of the same name, and it sparkled and soared with courtly beauty as the dance was meant to sublimely entertain us with the architectural refinement of classical ballet.

But as thunderstorms raged outside the theater, the orchestra’s pitch faltered and the dancers struggled with the paradox of secure technique mixed with movement torques that require that form be loosened. Only Gennadi Nedvigin seemed wholly unfazed among the men, with his unflagging technique letting him soar and pause with wit. Among the women, Vanessa Zahorian and Frances Chung, with their long legs, freed themselves to devour space and cheekily shoot off turns. The rest of the cast looked insecure.

But then in “Scotch Symphony,” a distillation of the 1832 “La Sylphide,” Courtney Elizabeth had a freedom she couldn’t fully muster in “Divertimento” and effortlessly ticked off the sass-filled allusions to Highland fling. Such luck didn’t befall Yuan Yuan Tan as the sylph in pink, however. She at times bordered on dour, rather than mischievous and ethereal, and Davit Karapetyan as the romantic, looked stolidly mystified rather than dreamy.

But then who ever said Balanchine, the quintessentially American choreographer, was easy?

A transit village with apartments, retailers, restaurants and a hotel is rising in Milpitas next to The Great Mall, close to light rail and the under-construction BART station. It’s one of several Silicon Valley projects sprouting up near transit.