Ehud Olmert said on Tuesday: "In order to ensure the existence of a Jewish national home, we will not be able to continue ruling over the territories in which the majority of the Palestinian population lives."
Olmert was addressing the Herzliya security conference where Sharon first flagged last year's withdrawal from the Gaza Strip.
Hinting that Israel would act alone to set a border in the West Bank if talks failed, Olmert said he hoped that Wednesday's Palestinian election would result in a government ready to follow a US-backed peace road map.
"There is no doubt that the most dramatic and important step we face is shaping the permanent borders of the state of Israel," Olmert said.
"We would prefer an agreement. If our expected partners in the negotiations in the framework of the road map do not uphold their commitments, we will preserve the Israeli interest at all costs."
Palestinians reacted warily to the suggestion of Israel acting unilaterally while Jewish ultranationalists were furious at the prospect of giving up land they see as a biblical birthright.
As the leader of the centrist Kadima party that Sharon founded weeks before he collapsed, Olmert is expected to win a general election in March on a platform of ending decades of conflict with the Palestinians.
Olmert supported the Israeli
withdrawal from Gaza last year
Olmert's comments were in line with what Sharon had said before he was incapacitated by a stroke.
Sharon's deputy and one of his more dovish advisers, Olmert was among the strongest supporters of withdrawing settlers from Gaza and has spoken of the need to pull back from the West Bank in such a way as to keep major settler blocs in Israel.
Road map pledge
In his speech, Olmert pledged to follow the road map, which calls for Israel to stop settlement expansion and remove unauthorised settler outposts. So far the Israelis have failed to do either.
He also urged the Palestinians to disarm fighters under the plan, a process which they have not begun.
Olmert said Palestinian attacks would prompt faster construction of the West Bank barrier that Israel says is meant to stop bombers. Palestinians say the wall is a land-grab that they fear will become a permanent boundary.
"Mr Olmert must abandon the ways of unilateralism"
Saeb Erikat, the Palestinian negotiator, said: "Mr Olmert must abandon the ways of unilateralism. The Palestinian Authority is fully committed to peacemaking."
Settlement supporters were furious at the suggestion of a further withdrawal from parts of the West Bank.
Aryeh Eldad, a right-wing politician, said: "Olmert is the beginning of the end of the state of Israel."
The hope that Israel's withdrawal of illegal settlers and troops from the Gaza Strip last year would spur progress on the road map has foundered while both Israel and the Palestinians have been caught up in electioneering.
Palestinians vote on Wednesday in their first parliamentary ballot for 10 years, which could for the first time usher into government the powerful Hamas Islamic movement, whose charter calls for Israel's destruction.
Israeli officials have said that a victory for Hamas could herald an end to Middle East peacemaking.
Olmert reiterated the demand that Palestinians disarm Hamas and other resistance groups, which Mahmoud Abbas, the Palestinian president, has suggested might be easier after the election.
In what appeared to be a warning to Israel, Fatah's al-Aqsa Martyrs' Brigades displayed a crudely built rocket it said could reach 27km (17 miles) into Israel, more than twice the distance of earlier versions. It offered no evidence to back the claim.