The Square is the first Egyptian film to earn an Oscar nomination – but it cannot officially be shown in Egypt itself. That is down to its provocative subject matter: the documentary charts the course of Egypt's political upheaval since 2011, through the eyes of a handful of Tahrir Square protesters. Here, the film's director, Jehane Noujaim, explains how she made it, and defends her protagonists against accusations of idealism.

Patrick Kingsley: The film focuses on half a dozen protesters who you follow over a three-year period, beginning right at the start of the 2011 uprising. Why did you decide to focus on these people in particular, and how did you find them so early in the revolution?

Jehane Noujaim: I look for characters that I fall in love with, that will take me places that I have never been, that challenge my thinking, and that I want to be led through the journey with. If I connect to them on a personal and human level, I know that an audience will connect to them and the film will reach the hearts and minds of people in Egypt and outside of Egypt. We were very lucky to have met the leads of the film early on in the revolution – all of them in the 18 days before [President Hosni] Mubarak stepped down.

There are three main characters in the film – Ahmed, Magdy [a member of Mohamed Morsi's Muslim Brotherhood] and Khalid. Ahmed, the lead character, is for me representative of so much of the youth that came down to the square – he grew up in Shobra, a very low-income area of Cairo, his mother is illiterate, and sold vegetables to make a living, his father died when he was a young boy. Yet it was important to Ahmed's mother to put him through schooling and he attended high school and two years of journalism school, but found no employment opportunity and supported himself by taking every odd job imaginable.

He went down to the square frustrated by the lack of opportunity in the country, disgusted by the corruption and demanding a different future, and a life of freedoms and dignity. I met him because a friend of mine was making a television piece on him, I became friends with him, and was completely drawn to his charisma, his street smarts, his wisdom about the "arab street" and his deep optimism about the future – which he still has, despite the difficulties that he has been through.

Magdy, I met because he was sleeping in the tent next door to ours – he always seemed to be on watch, and later told me that his job was to be on the look out for thugs, or people that were trying to come in to disrupt the protest. I got to know him because he would go up to Pierre Sioufi's flat and be involved in long, fascinating conversations with people who had very different religious and political views than he – yet he welcomed the debate with secular friends and was very open to teaching and learning from people coming from very different perspectives.

Khalid I met in the square through Aida El Kashef, an old friend of his and his wife, Cressida. I began speaking with Cressida in the square and asking her questions about how she felt about what was happening around us, and she quickly introduced me to her husband. Khalid was incredibly articulate about what was happening many times when frankly, I was trying hard to understand what was happening. He has a deep love for his country and the fate of its people, comes from three generations of political activism, and would spend hours in the square speaking and debating with people about the future of the country.

Rami Essam I believe I also met through Aida, and he was quite a prominent figure early on, turning the chants of the revolution into songs of the revolution. Aida, I had met while making a previous film (Shayfeen.com) which came out in 2007 and which followed the creation and the work of the activist group shayfeen.com.

Ragia, finally, although she gets a lot less screen time than she and her work deserves, is someone I have known since childhood. However, because most of her work occurred in prisons and courthouses outside of the square, she has not been as much of a focus in this film, which centered on the square and the relationship of the characters to the square.

PK: Which character changed the most over the course of the filming?

A Tahrir Square protester's bandaged hand bears the words: "I am proud to be an Egyptian." Photograph: Mohamed Abd El Ghany/Reuters

JN: I would say that all of them changed but perhaps Ahmed and Magdy changed the most. One sees Ahmed literally grow older physically in the film and go from being a kid in the street to having a political education. Magdy changes as well, as his relationship to the Brotherhood changes over the course of the three years.

PK: Several times in the film, the camera operators appear to be in severe danger – either from arrest or gunfire. What was the most challenging moment you personally faced during filming?

JN: This film was born from the square, so each person on the film crew came from the square and were protesters first. Each person on the crew was shot at, tear gassed, injured or arrested. Most have had their cameras confiscated, or smashed and footage stolen. I personally found the most challenging moment to be during Mohammed Mahmoud [the violent second wave of protests in November 2011]. I had been trying to film the ceasefire – it was a beautiful moment when the Sheikhs of Al Azhar were praying, the sun was setting and there seemed to be peace between the protestors and the army and police after three days of violence.

When the ceasefire was broken and tear gas began to fly – the people who were trying to keep the peace continued to pray, trying with all their might to keep the peace and calm. It was a beautiful scene that we filmed. Magdy (who I was with) and I ran towards the army side rather than the protester side. Finding ourselves surrounded by army, Magdy and I began a 10-minute interview with a teargas-mask-wearing army public affairs officer (who kindly directed me and Magdy as to how to leave the area) – I was then stopped by another, ski-mask wearing army general, who confiscated my film and equipment and delivered me to police officers who drove us around in a truck for a number of hours before I was found by Ragia Omran, the human-rights lawyer in the film. With her expert legal aid and the help of her lawyers, I was released along with the 300 others who had been rounded up. I still do find that the most challenging moment in that entire experience was the moment that the footage of that magical scenes of peacemaking was confiscated, never to be seen again.

PK: One analyst has criticised the non-Islamist activists in the film, and their colleagues, for only thinking about the revolution in the context of protests in and around the eponymous square – rather than engaging with the wider political process. What did you make of this criticism?

JN: The analyst should probably talk with the characters and ask them why they focused on the square as a tool for changing their country and why they felt that it was the best use of their time and efforts. The film is called The Square, and it focuses on the experiences of three characters from diverse backgrounds and their relationship with this particular piece of land, Tahrir Square, over the course of nearly three years. We felt this was an interesting subject, given that there are public squares that are being occupied in Kiev, Istanbul, Athens, Rio and the United States. We chose to follow people that were heavily invested in that square as a tool for change.

There were other people that were heavily involved in the political process, in the government, in the judiciary, in the elections, in the voting process, in the parliament – and those are interesting films to be made as well. The Egyptian revolution will be debated, analysed and written about for years to come and the experiences of all levels of the political process are being debated. There are important films to be made about the political process and we hope to see them soon – maybe this analyst would like to make one himself!

In the mentioned article, there also seems to be an illiteracy to the reading of the film – thinking that this film and its characters should be a representation of everything that happened in the revolution in the last three years. We took a deep personal look at what it meant to be Khalid, Ahmed and Magdy in the square, we were fascinated by their use of a piece of land as a political tool and their experience being inside of it, and that is the story we chose to tell.

PK: Hassan is shot during the army rule that followed Mubarak's resignation, and is filmed fiercely criticising military leaders. But 18 months later he welcomes the army's re-involvement in political life as they help overthrow Mohamed Morsi. What made him and others take this u-turn on the military?

JN: Ahmed Hassan never welcomed the army's re-involvement in political life. He says in the film "the army is coming down, lets not fool ourselves", but he is not welcoming their involvement in political life or the government. When Morsi is overthrown, Ahmed Hassan is happy because he saw Morsi as using the tools of democracy to try to create another dictatorship – and not being accountable to all people but only answering to the needs of the Brotherhood. However, this did not mean that he welcomed the army re-involvement. He says clearly to Magdy on the phone: "I want to come stand with you because this revolution was for a principal, not for blood, and what I have been worried about is going to start happening, that we are going to start killing one another."

Ahmed was very disturbed by the police and army's actions and clearly states it when he says: "The leaders are on top, and is always the people on the bottom that are dying and suffering – it doesn't matter who they are, christian, salafi, brotherhood, revolutionary, we are all Egyptian." His message is that we are all Egyptian and all of our rights should be protected.

A tear gas grenade explodes during clashes between protesters and Egyptian security forces, in Tahrir Square in July 2011. Photograph: Khalil Hamra/AP

PK: "The revolution is coming despite anyone," says Hassan, after protesters successively force Mubarak, the army and Morsi from power. As the new government takes an authoritarian turn, and with many Egyptians appearing to tire of constant political instability, do you think he's right?

JN: There is no denying that this a dark moment in Egypt, but as Ahmed Hassan has said, "the revolution is a voice", it has entered into every Egyptian home and there has been a shift of consciousness in the country in people's ability to effect change. The political timeline may not bear the results that many had hoped for Egypt – however, the passion and dedication of the many like Ahmed who were willing to sacrifice their life for the future of their country will never be destroyed and they will continue to fight for that change until it comes.

Documenting this movement and witnessing the incredible relentlessness of people like Ahmed has only reaffirmed our belief in Margaret Mead's words: "Never doubt that a small group of thoughtful, committed citizens can change the world; indeed, it's the only thing that ever has."

PK: The characters come from a range of backgrounds – and sometimes opposing ideologies – and yet they become friends as the film goes on. Was their bonding a process that was already in motion or did the making of the film help bring them together?

JN: As Ahmed says, "We meet each other in the square". The entire nation met in Tahrir, it was a melting pot of Egypt. It was also a place where people of very different backgrounds died next to each other, were injured next to each other and formed a bond with each other. We choose characters that we felt represented a diverse background and were people that we wanted to share with the world. What made them the main characters in the film was their actions and continual return to Tahrir Square as a political statement and as a symbol of their ongoing battle and refusal to give up in the struggle for the future of the nation.

What bonds Magdy, Ahmed, and Khalid is that they are all principled people, unwilling to compromise on the dream of a future of Egypt which recognises and protects the rights and freedoms of every Egyptian.