Two Palestinians were killed Thursday in Gaza City as Hamas and Islamic Jihad continued their violent clashes over the right to fire weapons in public. Islamic Jihad said its men were ambushed early Thursday by Hamas gunmen, dragged out of a mosque and shot in the legs. Another man, Nidal al-Daya, was shot in the head, Islamic Jihad said. A bystander, Salah al-Amoudi, who happens to be a Fatah official, was shot dead by masked gunmen shortly after as he was making his way home from the mosque, witnesses and hospital officials said. Hamas has pledged to keep the streets of Gaza safe, a contrast to the gang warfare and widespread crime that was prevalent while Fatah was in control, and appears to be sending a signal to other armed groups that they must adhere to Hamas rule. The Hamas-run Interior Ministry issued a statement saying an investigation has been launched into the killing of al-Amoudi. "We are not going to hesitate with anyone violating the law and trying to sabotage the stability in Gaza," the statement read. "We are going to put an end to all the chaos and use of arms in our country." The clashes began Tuesday night, when Islamic Jihad gunmen fired in the air in celebration during a wedding. Hamas, which overran the Gaza Strip in a lightning operation last month, has banned firing weapons in public. On Wednesday, Hamas fired a rocket at a house in Gaza City and traded fire with Islamic Jihad operatives inside, wounding 10 people, hospital officials said. One gunman later died of his wounds, according to Hamas. Gunfire could be heard for several hours. Islamic Jihad leader Khader Habib said the raid was unnecessary. "I solved the situation at the wedding yesterday," he stated. Hamas said in a statement that the Islamic Jihad gunmen were ordered to hand over their weapons but failed to do so, and "we implemented the law."