Exit polls of voters put Fatah seven or less percentage points ahead of Hamas, and all the polls suggested Fatah would not get enough support to keep a majority in the 132-seat Palestinian Legislative Council.
Correspondents say the strong showing by Hamas could result in a coalition government that could include Hamas cabinet ministers for the first time.
But Israel and the United States have warned that a Hamas entry into the Palestinian Authority could have consequences for the peace process. Israel refuses to have any dealings with Hamas, which officially calls for Israel's destruction, and the United States said it considers Hamas a terrorist organization and would have no relations with it.
More than three-quarters of some 1.4 million eligible voters were estimated to have cast ballots in the elections, the first legislative vote in the Palestinian territories for 10 years. No major disturbances were reported.
(compiled from agency reports)