RAMALLAH, West Bank (Reuters) - The Palestinian high court in Ramallah, amending an earlier ruling, decided on Monday that municipal elections can be held, but only in the West Bank and not in the Hamas Islamist-ruled Gaza Strip.

On Sept. 8, the court said the poll, originally scheduled for Oct. 8, could not go ahead after Hamas disputed party lists drawn up by Western-backed Palestinian President Mahmoud Abbas's Fatah party.

But in its latest ruling, which Hamas swiftly condemned as politically motivated, the court said it had "decided to implement the cabinet's decision to hold elections in all local councils except in the Gaza Strip".

The Central Elections Committee has, under law, up to four weeks to set a new date, which would be announced by the Palestinian cabinet.

A vote in the occupied West Bank and in the Gaza Strip would have been the first involving Hamas and Fatah since 2006, when Hamas won a surprise victory in legislative polls, an outcome that led to a rupture in Palestinian politics. Hamas seized the Gaza Strip from forces loyal to Abbas in 2007.

The vote will not be held in East Jerusalem, which Israel annexed after its capture in a 1967 war in a move that has not won international recognition. Palestinians want East Jerusalem to be the capital of a state they seek to establish in the West Bank and Gaza Strip.

"Hamas rejects the court's decision that divides the Palestinian people and will consult with other factions on how to confront it," said Hamas spokesman Sami Abu Zuhri.

While local elections were held in 2012, voting only took place in a fraction of the West Bank's 350 municipalities, and Hamas did not recognize the outcome.

(Reporting by Ali Sawafta and Nidal Almughrabi; Writing by Jeffrey Heller; Editing by Dominic Evans)