RAMALLAH, West Bank — President Mahmoud Abbas on Monday swore in a Palestinian unity government, taking a major step toward ending a crippling territorial and political split among the Palestinians but also setting the stage for new friction with Israel.

The brief ceremony at Abbas’ West Bank headquarters was preceded by last-minute haggling over the makeup of the 17-member Cabinet of technocrats, signaling the continued tensions between the long-time rivals.

The Islamic militant Hamas group, which seized the Gaza Strip from Abbas in 2007, had demanded that he reverse a decision to remove the position of minister of prisoner affairs from the government.

Just minutes before the start of the swearing-in ceremony, Hamas officials said that the dispute was resolved, though the nature of the compromise was not immediately clear.

The formation of a unity government is the most significant step yet toward ending the political split that has weakened the Palestinian case for a state in the West Bank, Gaza and east Jerusalem, lands Israel captured in 1967.

Over the past seven years, repeated reconciliation attempts have failed, with neither side willing to make significant concessions, even though the split is unpopular among Palestinians.

But both Palestinian factions now have incentives to repair ties.

Hamas is in the midst of a major financial crisis due to a border blockade imposed by Israel and Egypt, while Abbas is in need of a political accomplishment following the collapse of peace talks with Israel in late April.