On January 25, 2011, the day Egypt's revolution began, Jehane Noujaim had a tough call to make. She could stay in Cairo to see if anything might come from the rumors about big protests planned for that day. Or, she could chase some high-level Egyptian officials to Davos, Switzerland.
Noujaim had a highly-coveted ticket in hand for the prestigious gathering of global movers and shakers.
"On the way to the [Cairo] airport, I was thinking to myself, 'I could be making the biggest mistake of my life,'" Noujaim told me during an interview in her New York office.
The rumors about protests turned out to be true. And in Davos, those Egyptian officials were a no-show.
"I didn't film a thing," said the Egyptian-American filmmaker.
Noujaim made her way back home from Europe and had more setbacks. Her camera was confiscated at the airport. Then secret police detained her for questioning, wasting precious time as dramatic events played out in Tahrir Square and elsewhere across Egypt. Noujaim had a moment of panic, worrying that she was missing out on the story of a lifetime.
"It may have been a blessing in disguise, actually," she said. "It completely removed the temptation of making the film that most people have made, which was this 18-day film up until the removal of Mubarak."
Noujaim said her seemingly late arrival to the revolution got her to think longer term. So, the story in her new film, "The Square," essentially begins with a climax - the downfall of Mubarak. That is how we meet her main characters, most of them activists of one stripe or another spending lots of time in Tahrir Square.
But it does not take long for things to get messy. Just a month or so after Mubarak stepped down, tensions rise between protesters and security forces and there is a violent crackdown in the square.
One of Noujaim's characters got detained and beaten up badly. Another character goes to visit the young man and document his injuries on video. At the time, Noujaim recalled, she posted some of that footage online and friends of hers thought it was fake.
"'There's no way the army would do this,' was one response," Noujaim said. This was an important moment for Noujaim, when she realized that she was onto a story that needed to be told.
"The Square" covers two and a half tumultuous years of Egyptian politics, right up through the overthrow of President Mohammed Morsi last summer and the violent crackdown by security forces against his Islamist supporters that quickly followed.
The film's main characters are seen struggling with some of the tough questions forced on Egyptians by never-ending upheaval. How do people deal with the cycle of violence? Where is the breaking point? And what does it look like when revolutionaries turn on each other?
Noujaim was arrested three times herself while working on the film, and she saw plenty of violence, suffering and death up close. "It was completely heartbreaking," she said.
"But then, you see these shining lights," Noujaim said. "That's what I like to focus on in the film, because you focus on people and ideas that need to be shared with the world."
"The Square" opens in New York on Friday and Los Angeles on November 1.
Sign up for The Top of the World, delivered to your inbox every weekday morning.