CAIRO—Two days after Egypt's military replaced the country's president, it sent soldiers into the streets to quell demonstrations, as a week of tensions between Islamists and the military transformed into deadly confrontations that heightened some Egyptians' fears of civil war.

Demonstrations turned bloody Friday as hundreds of thousands of Muslim Brotherhood supporters turned out to protest this week's military-led ouster of President Mohammed Morsi. Muslim Brotherhood officials said police opened fire on protesters in...