Israeli Prime Minister Ariel Sharon , whose government recently withdrew settlements from the Gaza Strip and parts of the West Bank , has said participation in the election by militant groups such as Hamas would be unacceptable .