On June 30 millions of Egyptians protested against their president, Mohamed Morsi, in the largest demonstrations the country has ever seen. Three days later Egypt’s top general removed Morsi from office, saying the scale of the protests left him no choice.

But some leaders behind these landmark protests say they were in regular contact with the Army, via intermediaries, as they planned the demonstrations—and that it was clear their movement had the Army’s support.

In the days and weeks before the protests, Waleed al-Masry, a central organizer, was in regular contact with a group of retired military officers. These retired officers, Masry says, promised to protect the protesters who turned out on June 30. They said they were reaching out on behalf of the Army’s current commanders. “We didn’t ask them for help. They just offered it,” Masry says. “And we welcomed that.”

Masry was a key figure in Tamarod, or “Rebel,” the youth-led group whose campaign to collect signatures against Morsi snowballed into the protests that sparked his ouster. Tamarod’s leaders say they gathered 22 million signatures in just two months. While that figure is unlikely—and dismissed even by some of the group’s own organizers—signs of Tamarod’s grassroots success abounded as its campaign gained steam.

Teams of volunteers knocked on doors across the country. Many Egyptians downloaded Tamarod’s signature form online and passed it around. One organizer, Maha Saad, recounts working 16-hour days overseeing more than 400 volunteers tasked with entering all the names and ID numbers into a database. “It was crazy, really,” she says.

Even as the signature count grew and the protest plans intensified, however, many organizers knew Morsi would never step down on his own. Some admit that the more realistic aim of the protests was to inspire the military to step in—paving the way, they hope, for a smooth transition to fresh elections.

Tamarod’s leaders say that in removing Morsi, the Army was responding to the protesters in the street, not taking initiative on its own. The military and its backers have been keen to reinforce this point. “The armed forces couldn’t plug its ears or close its eyes as the movement and demands of the masses [calls] for them to play a national role,” Egypt’s Army chief, Gen. Abdel Fattah al-Sisi, said as he announced Morsi’s removal on July 3.

But critics of Morsi’s ouster have alleged that the Army may have played a role in supporting the very protests it cited as justification for overthrowing him.

Moheb Doss, one of Tamarod’s co-founders and main organizers, says the group’s leaders received communications from the Army and other state institutions who had turned on Morsi in two ways. First, he says, they hinted at their intentions via media statements that all Egyptians could see. “The country’s institutions—the police, the Army, the judges—were clear from their messages in the media that they were in favor of getting rid of [Morsi],” he says.

“The second way,” Doss adds, “is individual communications between Tamarod people and state institutions.”

Doss says he didn’t take part in these communications, but that they were well known among Tamarod’s leaders. The meetings with retired Army officers, he says, related strictly to security. Morsi’s allies in the Muslim Brotherhood and Egypt’s more hardline Islamist groups had routinely threatened violence against protesters. At previous demonstrations against Morsi, meanwhile, many had been killed by police.

“It is normal to communicate with the Army before the revolution. We respect the Egyptian Army,” Doss says.

Doss adds that Tamarod, as well as the protesters, led the way. “In the end, 33 million people went to the streets,” he says, citing an estimate popular with Morsi’s opponents. “And in the end, the army supported that.”

Despite fears of widespread violence on June 30, the protests went on relatively peacefully. And authorities made no effort to stop protesters from massing around Cairo’s presidential palace and in Tahrir Square. Some police officers even joined them.

Another Tamarod organizer recounts taking part in a meeting with colleagues and former military officers in the basement of a popular Cairo restaurant in the week before the protests. The former officers, he says, “were the bridge between us and the Army during the preparations for June 30.”

At the meeting, this organizer says, the former officers promised security on June 30. “They told us, ‘You are forbidden from chanting against the military or police ... Only focus on Egypt, and we will help you,’” Adel says.

Masry, the Tamarod member who coordinated with the ex-officers, says they advised him to ensure that protesters remained nonviolent. They asked nothing in return for their help with security, describing it as a “national role,” he adds.

One former general whom protest organizers say they met, Abdul Rafe Darwish, has been retired for 23 years. But, he says, “still now I have connections with the commanders here.” Darwish, who heads a small political party, says he helped protesters with security—“I protected them in Tahrir and in other governorates”—though he declined to detail how. He adds that he advised protest leaders to stay peaceful. “I told them no fighting. No weapons. No violence. Everything peacefully,” he says.

Darwish says he acted as a link between protest leaders and military officials, saying that he “conference” between the two sides.

A spokesman for Egypt’s military did not return requests for comment.

Some organizers insist there were no communications between Tamarod leaders and the Army before the protests, even via unofficial channels. “I am telling you very clearly: I only met the Egyptian people,” says Tamarod co-founder Mahmoud Badr.

Mahmoud Rusdie, a retired colonel who worked with Tamarod in organizing and collecting signatures, adamantly denies any link between the group and the current military brass. “You are trying to convince the world that the Army is the one who made Tamarod, and that it did a coup!” he says. “The Egyptian people are smart. We are not as stupid as you think.”

With reporting by Maged Atef in Cairo.