The new Palestinian prime minister has quit two weeks after being sworn in, apparently over a constitutional dispute with the president.

Rami Hamdallah, whose appointment was announced by President Mahmoud Abbas 18 days ago, resigned amid mounting concerns over the difficulties facing the US-led drive to get peace talks with Israel restarted.

According to a well-placed source, Hamdallah's move stemmed from the imposition by Abbas of two deputy prime ministers. Constitutionally, the prime minister should appoint his own deputy. Reuters quoted a government source as saying the resignation was the result of a "dispute over powers".

It was unclear whether Abbas had accepted the resignation, or whether a compromise was being attempted. Hamdallah had succeeded the western-backed Salam Fayyad, who quit in April following a long-running dispute with the president.

Hamdallah, 54, a British-educated political independent, had no direct experience of government before his appointment. But he was respected for his 15 years as president of An-Najah National University in the West Bank. He was due to lead a technocratic government until elections were held, assuming an agreement could be reached between Fatah, the dominant faction in the West Bank, and Hamas, which rules Gaza.

The unexpected development came as it was announced that the US secretary of state, John Kerry, would visit the region next week, his fifth trip there since March, as part of a 12-day tour to Asia and the Middle East. Kerry is trying to persuade Israel and the Palestinians to return to direct negotiations, but many political players on both sides are, in private, sceptical about the prospects for a renewed peace process.