It has been almost two years since Egypt’s astonishing revolution began at Tahrir Square in Cairo, the Arab Spring’s biggest moment. As Fredrik Stanton’s documentary “Uprising” makes clear, though, what may have seemed a spontaneous protest by millions against the oppressive 30-year rule of President Hosni Mubarak actually capped years of growing unrest.

“Uprising” puts events in context by skillfully blending interviews with diplomats, academics and many of the young Egyptians who organized the rebellion. Mr. Stanton also makes great use of footage filmed by demonstrators. What began as a huge, peaceful protest became a bloody siege, with the despised police forces trying to repel an increasingly radicalized public. After 18 days more than 800 citizens were dead, thousands more injured. Only when Egypt’s military vowed to protect the demonstrators did the standoff resolve and Mr. Mubarak resign.

Among the film’s virtues is its analysis of the strategies that channeled the unrest. Rather than convening at Tahrir Square, for example, marches began at five staging areas, with thousands joining the protests as they converged. And social media proved the ultimate populist weapon. One organizer recalled how the protest, organized on Facebook, created its own jokes: “I am attending the revolution.”

Mr. Mubarak is now serving a life sentence. Mohamed Morsi was elected president in June, but the transition has been troubled and, the film notes, “the struggle for full democracy in Egypt continues.” Even so, “Uprising” is a concise commemoration of a new society’s birth pains.