“One of the hardest things to figure out is when you’ve really finished a film, when to say stop,” the director Jehane Noujaim said.

She thought she knew: When her latest, “The Square,” a documentary about the Egyptian revolution, played at the Sundance Film Festival in January, it ended with the election the previous June of the Muslim Brotherhood candidate Mohamed Morsi as president, replacing Hosni Mubarak after 30 years of authoritarian rule. But history has no respect for filmmakers, and even before the first screening, Ms. Noujaim knew she needed to regroup.

She did, several times as events unfolded. There was a cut for Sundance; another one submitted in the summer to the Toronto International Film Festival; the version that actually played Toronto in September; and the final one opening Oct. 25 in New York (similar to the previous version, with technical tweaks).

“Until this last cut I was never completely satisfied,” Ms. Noujaim said.

In each case the story began in 2011 with anti-Mubarak protesters taking over Tahrir Square in Cairo. The locked version of the film continues through the 2012 election of Mr. Morsi and concludes with the military ousting him in July and the massacre of his supporters at sit-ins in August.