A few short months ago, Egyptian soldiers were the good guys who accepted U.S. aid and training, engaged in officer exchanges with Americans, and even saluted Arab Spring protesters who were demanding an end to President Hosni Mubarak’s 30-year rule back in January.

But on Sunday, that image of a reliable, restrained force came crashing down when an Egyptian military vehicle plowed through a sidewalk and slammed into pro-democracy demonstrators on the streets of Cairo.

The transformation of the Egyptian soldier’s image, from someone who helped to ensure stability during the unruly days of Mubarak’s ouster to someone who seemed hell-bent on killing protesters, seemed abrupt and disturbing.

And for the United States, it created a delicate balancing act.

Since 1979, Americans have provided $1.3 billion per year in military aid to Egypt, according to a senior U.S. defense official. The backing has allowed thousands of Egyptian officers to come to the United States to study at places like the Army War College and the National Defense University, as part of a program called International Military Education and Training that was designed to teach foreign officers about U.S. political and military institutions.

Those lessons in democracy seem particularly important now that Egyptians are preparing for their first free and open elections, a marathon event that will start in November and extend for several months. Americans have a lot riding on a fair, and peaceful, electoral process in Egypt, and despite the troubling reports from Cairo over the weekend, American officials are standing behind the Egyptian military, showing restraint in their reaction. They must since the administration’s strategy has relied on the Egyptian army to handle the transition to elective democracy.

“The Egyptian military has demonstrated great professionalism, and our assistance programs underpin our relationship during this time of uncertainty,” a senior U.S. defense official said in an email to The Daily Beast, requesting anonymity because he did not have permission to speak on the record about the subject. “They have thus far demonstrated nothing short of a firm commitment to a credible, inclusive, and transparent transition process.”

The military traditionally has been respected in Egypt because of its professionalism and competence, unlike the police, who built a reputation for brutality and lawlessness.

People who have met the Egyptian officers in Washington say the exchange programs are immensely beneficial. Gawdat Bahgat, who has taught seminars for the officers at the National Defense University’s Near East South Asia Center for Strategic Studies, described taking the officers to Mount Vernon, Virginia, for a visit last year.

During a tour of the estate, the officers learned about George Washington’s life and also discovered that he had chosen to give up his power—voluntarily. “I cannot forget the expressions on their faces. They could not believe it,” he told me, speaking on the phone from Cairo, where he was meeting with government officials and others. “They asked, ‘Why?’ and we said, ‘It’s the American way.’”

Bahgat said he believes the seminars in Washington have had an impact on the Egyptian officers, explaining that many of them returned home and managed to show restraint during the Arab Spring uprising.

“They acted in a very professional way and refused to shoot at protesters,” he says. Moreover, he said he is optimistic about the future of the Egyptian military and believes that the American investment in their leaders and their institution has been a sound one.

That is not how many Egyptian Americans interpreted the weekend’s events.

“We had people crushed by U.S.-funded military equipment,” said Dina Guirguis, a democracy activist and former fellow at the Washington Institute for Near East Policy who is, like Bahgat, originally from Cairo. “An armored car was driving over the sidewalk as people were fleeing for their lives.”

She decried the “vicious” actions of the Egyptian military and questioned the support that the soldiers and officers have received from the U.S. government.

Americans, of course, have poured money into the Egyptian military not for altruistic reasons: they want, among other things, to promote regional stability.

“The way we’ve done that in the past is to prop up Mubarak,” said Bruce Rutherford, the author of a 2008 book presciently titled Egypt After Mubarak.

Now that Mubarak is gone, Rutherford said, Americans are hoping for a successor government that will have popular support.

Such a goal forced the administration to keep quiet about the weekend’s brutal episode. And for the immediate future, the U.S. government will keep its bets on the Egyptian military to keep the order.