(CNN) -- When tens of thousands hit the streets to decry an authoritarian regime -- calling for its overthrow, trying to overrun police, setting fires -- one might expect the arrival of army tanks would be met with fear, consternation and violence.





But not in Egypt.





The warm embrace that demonstrators gave troops this week illustrated the military's respected and central role in Egyptian society. This fact makes the armed forces potentially a kingmaker in the current crisis, while also showcasing its challenge to somehow re-establish security without undermining its popularity.





"How they behave on the streets is going to matter a whole lot," said Shibley Telhami, a Middle East expert and senior fellow at the Brookings Institution think tank. "That's going to be the dilemma: Can they maintain the order without antagonizing the public that they need?"





The ascendance began in 1952, when the military helped overthrow Egypt's ruling monarch. Its support for a constitutional democracy and its performance in various wars and battles earned it the admiration of many Egyptians.





"There's a good reason that the Egyptian military is held in pretty high esteem," said Peter Bergen, a CNN national security analyst, author and fellow at New York University's Center on Law and Security. "The army has done relatively well."





All males between ages 18 and 30 must serve one to three years, as the CIA World Factbook notes, meaning almost every family in Egypt has some personal connection to the military.





Still, one of the military's biggest assets in the eyes of everyday Egyptians may be that it is not the widely reviled security force. The U.S. State Department has frequently blasted Egyptian police for torture and otherwise depriving citizens of their civil rights, including in its most recent 2009 Human Rights Report.





"They're held in great disdain by their own population, for very good reason," Bergen said. "They know that security forces have tortured literally thousands of people ... for almost any reason."





This animosity boiled over this week, when angry demonstrators burned and ransacked police stations. On Friday, there were reports of casualties after police fought back citizens' attempts to take the Interior Ministry in Cairo, the security forces' headquarters.





Just blocks away, in Tahrir Square, it was a very different and far more festive scene: Joyous demonstrators gathered near troops and embraced them, sometimes literally.





This showering of love on the military, which were deployed Friday to patrol the streets for the first time since the mid-1980s was repeated many times over throughout Egypt.





Video footage from Cairo showed some protesters celebrating by scaling tanks, with no repercussions. Many of them smiled and shook hands with troops on patrol, with one soldier even cradling a baby and posing for a picture.





In Alexandria, where at least 2,000 gathered in Raml Square on Saturday, protesters chanted, "The military and the people together will change the regime."





That said, these same demonstrators were demanding the overthrow of President Mubarak -- a former hero in the Air Force and the commander-in-chief of the armed forces. He has largely surrounded himself politically with other veterans, including Saturday's appointment of Omar Suleiman (a former lieutenant general in the army) as vice president, the first time Mubarak has tapped someone for that role in his 30 years in power.





Experts aren't surprised Mubarak has moved to align himself with the military even more so, recognizing the armed forces' place in Egypt. Still, by doing so, he also created a quandary for the military: Do they back Mubarak, whom they report to? Or do they support the people, having largely been among them not long ago and wanting to preserve their reputation?





Andrew Pierre, a senior fellow at the U.S. Institute of Peace, said he expects top military officials to remain loyal to the president. But the rank and file are a different story, especially if they are called on to beat back civilians.





"They're military people for two years or so, and I don't know that they will be willing to shoot
The military must decide how to keep order without antagonizing who? Who have embraced Egyptian troops? Who embraced the Egyptian troops? What did an expert say about the military? What have protesters embraced? Where is the military now well represented? Who is well represented in Mubarak's government?
the public demonstrators demonstrators "How they behave on the streets is going to matter a whole lot," troops in Egypt. the military's
question: The military must decide how to keep order without antagonizing who?, answer: the public | question: Who have embraced Egyptian troops?, answer: demonstrators | question: Who embraced the Egyptian troops?, answer: demonstrators | question: What did an expert say about the military?, answer: "How they behave on the streets is going to matter a whole lot," | question: What have protesters embraced?, answer: troops | question: Where is the military now well represented?, answer: in Egypt. | question: Who is well represented in Mubarak's government?, answer: the military's