President Obama on Monday declined to press Egyptian President Mohamed Morsi to leave office, saying that his administration would continue to work with the “democratically elected government” amid violent protests in Cairo.

“It’s not our job to choose who Egypt’s leaders are; we want to make sure all voices are heard,” Obama said Monday during a joint press conference with Tanzania President Jakaya Kikwete in Dar es Salaam.

Anti-government protesters in Egypt Monday stormed the headquarters of the Muslim Brotherhood, Morsi’s political party, and said that if the leader did not step down by Tuesday, they would call for a nationwide march on the presidential palace.

At the same time, the Egyptian military on Monday gave Morsi and his political opponents a 48-hour window to reach an agreement, saying they would intervene if the two could not broker a deal.

Egyptian officials say that at least 16 people — including an American college student studying abroad — were killed and hundreds more injured in recent days.

Obama expressed concern over the violence but refused to endorse either side.

“Our commitment to Egypt has never been around any particular individual or party — our commitment has been to a process,” Obama said. “They went through an election process that by all accounts [was] legitimate. And Mr. Morsi was elected. And the U.S. government’s attitude has been [that] we would deal with a democratically elected government.”

However, Obama added that, “Democracy is not just about elections,” telling Egyptians that “assaulting women does not qualify as peaceful protest.”

There have been numerous reports of women being brutally beaten during the protests in Cairo.

The protesters say that Morsi is responsible for a tanking Egyptian economy and a breakdown in the rule of law there. Morsi’s supporters counter that he was democratically elected not even a year ago and needs more time to institute his reforms.

Ahead of protests that ended a nearly three-decade dictatorship in Egypt, Obama previously joined the calls for former President Hosni Mubarak to step down. The Obama administration has since cautiously backed the Morsi regime, but the recent violence in Cairo epitomizes the many pitfalls that come with such tenuous support.

“All the parties there have to step back from maximalist positions,” Obama said. “Democracies don’t work when everybody says, ‘It’s the other person’s fault, and I want 100 percent of what I want.’”