Egypt’s stock markets may be up and its bond yields down, a sign that many businesses and investors welcome the army’s iron grip. But multinationals are easing their way out of the violence that has killed 1,000 or more people in the past few days. They’ve been temporarily shutting down local operations and evacuating staff, with everyone from Turkish textile manufacturers to GM and Electrolux taking a break from the unsettled nation.

"If the cost of doing business is greater than what you make, then of course you stop doing business," says David Nyheim, the chief executive of International Conflict and Security Consulting. "Then you have the reputational costs that come into play as well. Some countries like Myanmar used to be a place where doing business had huge reputational cost."

Business hasn’t been as usual in Egypt since the military pushed president Hosni Mubarak out of office in 2011 after 30 years of rule. That event saw the evacuation of many foreign staff. After Mohamed Morsi became president last year, taxes on business were hiked, corporate registration rules were tightened, electricity shortages cut power for several hours a day; the government even contemplated shutting down the airport for four hours a day to save on energy costs. All that had many companies reluctant to do more than keep current operations running.

"Coke was suddenly like, ‘oh my God, we have to fire half our staff;’ people making not even 600 Egyptian pounds a month, not a hundred dollars a month," says a Cairo-based consultant who asked not to be identified for her safety. "These irrational decisions on taxes and on legal procedures made it very difficult for companies to actually make projections."

Things got worse after the military, backed by mass protests, deposed Morsi on June 30. Street battles between Morsi supporters and soldiers and a 7 p.m. to 6 a.m. curfew exacerbated Cairo’s already notorious traffic jams. "The country was reaching a point of no return on so many levels," the Cairo-based consultant says. While she expects the violence to subside in the coming weeks, not turn into a civil war, she does worry about terror attacks, bombings and kidnappings.

Last week’s massacres by the military pose additional problems for foreign firms. Some facilities, especially in the oil industry, are guarded by soldiers, who may now be implicated in human-rights violations. Royal Dutch Shell, which closed its facilities in Egypt last week, has attracted criticism for paying Nigerian soldiers who guarded its facilities in the Niger delta but also launched a brutal counter-insurgency.

RJ Hope, manager of Global Security Services for Burns and McDonnell, an international engineering firm that doesn’t have offices in Cairo, notes that local relationships are key to keeping employees and assets safe in foreign countries—"the first time you meet your emergency responder, you should not be exchanging business cards while your business is on fire." But that gets extra tricky when the legitimacy of the local authorities is at question.

"For many companies that have business relationships with government, particularly some of the larger ones, they will be thinking very carefully about how they engage with the current regime—and who is likely to follow," Nyheim says.