Egypt's military, built with tens of billions of dollars in American technology and training, is facing its biggest test in decades and giving U.S. officials a look at whether their massive investment has built an institution of social cohesion or one ready to turn on opponents of the current government.
Built to fight a major tank war and maintain a degree of parity with neighboring Israel, the army is being deployed on a very different mission: keeping civil order in the country under the watch of U.S. officials who have appealed for restraint.
The arrival of tanks and troops in Cairo's streets seemed to calm a tense situation, suggesting that the Egyptian military will play a key role as the country navigates its way out of the current crisis. On Saturday, soldiers seemed largely to sympathize with the throngs of protesters.
The massive amounts of defense aid - which have made Egypt's military one of the more effective forces in the region and yielded a relatively stable and wealthy officer class - will probably give the United States some critical leverage, Middle East analysts said.
U.S. military aid to Egypt, which totaled $1.3 billion in 2010, has held steady in recent years, even as aid for economic development, health and education has been cut. Aid to Egyptian police and riot-control forces, which amounted to about $1 million last year, is minuscule by comparison.
"The military relationship has been sacrosanct," said Jon Alterman, a senior fellow at the Center for Strategic and International Studies. "It is an important relationship for both countries, but it is not a relationship of soul mates."
The Obama administration says it is having "robust" conversations with officials throughout the Egyptian government about the unrest. On Saturday, President Obama's National Security Council convened a special two-hour session to discuss the crisis.
But the administration has also said it might review aid to Egypt. Congressional officials have cautioned the Egyptian military and President Hosni Mubarak that they have a great deal to lose if violence is used to keep the government in power.
A misuse of force "could have very serious consequences," said Sen. Patrick J. Leahy (D-Vt.), who authored a law restricting aid to foreign governments that are guilty of human rights violations. "They run the risk, if they overreact, of cutting ties with a country they need."
The United States also has much to lose if American-made tanks, rifles and helicopters are used by Egypt's military to stop rioters. A major crackdown with U.S. arms would almost certainly alienate the Eygptian public and much of the Arab world.
Egypt's military, which is considered one of the country's foundational institutions, would probably play a critical role in managing a transition to a new government if Mubarak was forced from power.
Egyptian Lt. Gen. Sami Enan, the chief of staff of Egypt's army, was at the Pentagon late last week for scheduled talks on security assistance and upcoming joint training and exercises. The talks were led by Alexander Vershbow, assistant secretary of defense for international security affairs, who urged restraint in dealing with the unrest, a senior defense official said.
So far, however, top Pentagon officials, including Defense Secretary Robert M. Gates and Adm. Mike Mullen, chairman of the Joint Chiefs of Staff, haven't weighed in with their Egyptian counterparts - a sign that most senior U.S. leaders think an aggressive crackdown is unlikely.
Beyond the billions of dollars in military equipment delivered to Egypt, the U.S. government has spent tens of millions of dollars in the past decade bringing Egyptian military officers to the United States for training and education.
Throughout the Iraq war, the United States has relied heavily on the use of Egypt's Suez Canal to resupply U.S. forces. As ships pass through the canal, Egyptian forces secure the banks on either side. Most of Europe's oil supply moves through the canal as well.
Egypt's strategic importance is also magnified by its peace treaty with Israel, which makes it a key player in any future resolution of the Israel-Palestinian conflict.
For its part, Egypt has benefited from access to such equipment as the M1 tank and the F-16 fighter. Egypt does not receive versions as advanced as those sold to Israel, but these are potent weapons for a country whose military concerns include such unlikely threats as a desert incursion by Libya.
Egypt has also had the benefit of extensive U.S. training, and the development of defense-related businesses has helped enrich top officers and made the officer corps a pillar of the Egyptian middle and upper-middle class.
But the relationship between the two militaries has not been trouble-free. Documents released by the Web site WikiLeaks reflect sharp exchanges in the past year between U.S. and Egyptian officials over issues that include apparent violations of military-use agreements. U.S. officials, for example, were upset about a visit by Chinese officers to an F-16 base, and they demanded reassurances that U.S. technology was being kept secure.
One State Department cable released by WikiLeaks describes a meeting in which Maj. Gen. Mohammad al-Assar, assistant to Egypt's defense minister, warned U.S. officials not to put limits on U.S.-made aircraft and tanks in Egypt.
According to the cable, dated in February 2010, Assar "noted that the Egyptian military preferred to purchase its weapons and armaments from the United States, but that Egypt's national security was a red line and they could go elsewhere if they had to."