GAZA CITY, Gaza Strip (AP) – A Palestinian militant with ties to Hamas was killed in a car bomb Friday, unleashing factional unrest that left three others dead and 35 wounded, in the first direct threat to the Islamic group’s new government.

Followers of the militant blamed security forces loyal to Palestinian President Mahmoud Abbas’ Fatah movement for the assassination, raising the possibility of wider clashes just two days after Hamas assumed power.

The militant, Abu Yousef Abu Quka, was a senior commander of the Popular Resistance Committees, an umbrella group of about 200 gunmen that has been linked to explosions of Israeli tanks and a deadly attack on a U.S. diplomatic convoy in 2003.

About half the gunmen are allied with Hamas, including Abu Quka, and the other half with Fatah. Abu Quka’s supporters blamed the Fatah-dominated Preventive Security Services for his assassination; a shootout at the militant’s funeral killed the three others and wounded 35.

Hamas took control of the Palestinian Authority on Wednesday after trouncing Fatah in legislative elections in January.

It has pledged to restore order in the Gaza Strip and West Bank, but Palestinian security forces, most of them affiliated with Fatah, are involved in the violence, and Hamas has little control over them.

Abbas, a moderate who favors peace talks with Israel, is a vocal critic of violence but has struggled to gain control over the security forces since his election last year.

Palestinian Prime Minister Ismail Haniyeh ordered an investigation into the killing and urged calm. “I want to stress the need not to slide toward civil war,” he said in a televised interview. “Let us not direct our arrows at each other.”

Haniyeh’s government held an emergency meeting Friday night to discuss the violence. The prime minister left without speaking to reporters.

The ministers formed an investigative committee and pledged to remove all “armed men” from the streets of Gaza, said Information Minister Yousef Rizka. Gaza has been ravaged by lawlessness in recent months, with gunmen roaming the streets with impunity. Many of the gunmen have links to Fatah.

Hamas’ interior minister, Said Siyam, who is in charge of several security agencies, including preventive security, promised to bring Abu Quka’s killers to justice. He also called for unity. “We regret the exchange of accusations and mentioning of names,” he said.

Abu Quka was killed Friday when his white Subaru blew up in a Gaza City street. The Popular Resistance Committees initially blamed Israel, which denied involvement, and then pointed to the Preventive Security Service.

“There is a long history of conflict between us,” said PRC spokesman Abu Abir, an Abu Quka ally. “The Preventive Security always tries to demean our members.”

Abu Abir said gunmen loyal to Mohammed Dahlan, the former Prevent Security Service chief in Gaza and a Fatah lawmaker in the new parliament, were caught spying on Abu Quka’s home Thursday.

Abu Abir said he and his allies declared “an open war” on Dahlan and several other top security commanders.

Despite Fatah’s election loss, Dahlan remains one of the wealthiest and most powerful figures in Gaza, with hundreds of gunmen, including members of preventive security, still loyal to him.

Dahlan, who was in the United Arab Emirates, dismissed the allegations as “baseless ugly accusations.”

Palestinian intelligence officials said Abu Quka was a known Hamas supporter, and appeared to have been targeted for his loyalties. The officials, fearing for their safety, spoke on condition of anonymity.

When Abu Abir called a news conference to discuss the killing, rival gunmen burst on the scene, sparking a shootout. Hospital officials said two boys, ages 15 and 13, were wounded, one seriously.

The violence escalated during Abu Quka’s funeral procession. Accompanying the body, hundreds of gunmen marched through the streets of Gaza City.

Gunfire broke out at the funeral. Hospital officials said three people were killed, including two bystanders and a PRC member who had joined the procession. Thirty-five others were wounded, six critically, they said.

After the funeral, dozens of Fatah-linked gunmen blocked the roads leading to the home of Samir Masharawi, another strongman close to Dahlan. A spokesman for the gunmen pledged to take “all necessary measures against Abu Abir. He must be punished.”

Friday’s unrest came hours after Fatah-linked militants carried out a suicide bombing in the West Bank. The attack, which was denounced by Abbas, was carried out by a militant who disguised himself as a Jewish hitchhiker and then killed himself and four people in a car that picked him up.

Israeli security officials say they expect more suicide bombings from Fatah militants now that Hamas has taken power.

Early Saturday, Israeli aircraft destroyed an empty building in the northern Gaza Strip used by Palestinian militants for cover during rocket attacks, the army said.

Palestinian security officials said the Israeli missiles fell in a nearby field. Witnesses said the building suffered some damage. The officials said no one was hurt in the attack.