GAZA CITY — Rival Palestinian factions Fatah and Hamas on Wednesday announced a reconciliation deal to end their seven-year schism, in a further blow to U.S.-led efforts to broker a peace agreement between the Palestinians and Israelis.

Leaders of the groups said they will form a unity government within five weeks, solicit a vote of confidence from the Palestinian Parliament and schedule elections in six months.

“This is good news to tell our people: The era of division is over,” Ismail Haniyeh, prime minister of Hamas, said at a news conference in Gaza City.

The militant Islamist Hamas, which controls the Gaza Strip, and Fatah, which controls the West Bank, have failed repeatedly to overcome differences. Because of that history, the announcement was greeted with wide skepticism.

Unlimited Digital Access. $1 for 4 weeks.

If a deal were signed, it could halt the teetering Israeli-Palestinian talks and create obstacles to even minimal dealings between Israel and the Palestinians.

Israel and the United States consider Hamas a terrorist group. The U.S. government says it won’t deal with any government that includes Hamas unless the group shifts its position by recognizing Israel, forswearing violence and adhering to Palestinian agreements with Israel.

The Palestinian factions have been divided since 2007, when Hamas seized control of Gaza, a year after it won elections there.

The State Department expressed concern Wednesday about the timing and nature of the deal, which came within days of the Obama administration’s April 29 deadline for reaching a peace accord.

Israeli Prime Minister Benjamin Netanyahu suggested the move raised questions about the commitment of Palestinian Authority President Mahmoud Abbas to an Israeli-Palestinian peace deal. After the announcement he canceled a planned meeting between Israeli and Palestinian negotiators.

Hamas and Fatah have incentives for reaching a deal, or at least for continuing negotiations. Residents of Gaza and the West Bank are unhappy with both factions. Arab aid to Hamas has fallen off since the “Arab Spring” revolts, and Egypt’s anti-Islamist government has been clamping down on the smuggling of goods into the impoverished zone, sharpening Gazan dissatisfaction with the government.

For Abbas, a unity deal could divert attention from the collapsing peace talks and his risky move to seek membership in international organizations as a way of gaining diplomatic leverage with Israel. He also may view the move as a way to pressure Israel to make concessions to keep the peace process alive, some analysts said. Others suggested he might be looking for a way to leave office on a defiant note, amid popular acclaim, after years of frustration.

A key test of the agreement will be whether the sides can agree soon on a caretaker government of apolitical technocrats. Squabbling over the government’s composition has derailed past reconciliation attempts.

Material from The Associated Press is included in this report.