GAZA CITY, Gaza Strip (AP) — The Hamas militant group condemned the killing of at least 40 Egyptians at a Cairo sit-in Monday, though it stopped short of taking sides in the unfolding crisis in neighboring Egypt.

Hamas said Monday it “voices extreme pain and grief for the falling of these victims” and sent condolences to the families of those killed.

The Palestinian Islamist group, which rules the Gaza Strip, is an offshoot of the Muslim Brotherhood, the movement of toppled Egyptian President Mohammed Morsi. Egyptian soldiers and police opened fire on supporters of the ousted president early Monday in violence that left at least 40 people killed, including one officer.

Gaza borders Egypt and Hamas had made important gains with Morsi in power. With his ouster, it is likely to suffer setbacks. Since Morsi was deposed last week, Egypt has shut a key land crossing for Gaza indefinitely, citing security concerns.

Hamas has remained silent about the overthrow of its Egyptian ally. While identifying ideologically with Morsi, Hamas also maintains ties with Egyptian security forces that patrol the border with Gaza. The vague wording of Monday’s statement likely reflected the group’s concerns about being perceived as taking sides.

Hamas officials in Gaza declined to elaborate on Monday’s statement, which was issued by its exiled parent movement.