He also defended his country's two-week-old offensive in the Gaza Strip, said he is "absolutely determined" to carry out his planned West Bank withdrawal, and rejected international criticism.
Speaking to foreign reporters, including CBS News correspondent Robert Berger, Olmert said any other country that had a thousand rockets fired at its sovereign territory would do the same thing.
In other developments:
Olmert said separation between Israelis and Palestinians is "inevitable," adding the current round of violence in Gaza won't prevent the establishment of a Palestinian state alongside Israel.
Olmert wants to withdraw from most of the West Bank by 2010 to allow the Palestinians to gain independence and to enable Israel to finalize secure borders.
"I haven't changed my basic commitment to the realignment plan," he said, referring to the pullout. "I am absolutely determined to carry out the separation from the Palestinians and establish secure borders."
If peace efforts remain stalled, he said, he will carry out the withdrawal unilaterally, just as Israel carried out a unilateral pullout from the Gaza Strip last year. As a first step, Olmert said he expects to begin uprooting unauthorized outposts in the West Bank in the near future.
Continued rocket fire out of Gaza, along with Israel's recent invasion of the area, has raised questions about whether Olmert can carry out the West Bank pullout. The withdrawal could put major Israeli population centers well within the range of Palestinian rockets.
But Olmert said the violence cannot halt a process of separating the Israelis and Palestinians that began with the Gaza withdrawal.
"We want to separate in a friendly manner and to live alongside each other ... in a peaceful way," he said. "If the terrorist organizations will impose a violent confrontation, both Israelis and Palestinians will have to bear the consequences. That can't stop the inevitable process of separation of Israelis and Palestinians."
"The Palestinian people are united on insisting the that the (Israeli) prisoner soldier be traded for (Palestinian) prisoners in Israeli jails," Mashaal told a news conference in Damascus, reiterating what his aides have said since the soldier was taken.
"We say to the world that we as a true people and movement do not forget our prisoners," he said.
Mashaal blamed Israel for the collapse of Egyptian, Qatari and European mediation efforts to solve the crisis over the captured Israeli soldier.
"These efforts hit snags over Israel's insistence on the release of the Israeli soldier and its refusal to release Palestinian prisoners," he said.
"This is not a solution ... We don't want escalation. We are for a peaceful, quiet resolution."
"The solution is simple: an exchange. But Israel refuses that," he said, adding that the Israelis are "under an illusion" if they think that by escalating their offensive they will win the soldier's release.
"Trading prisoners with a terrorist bloody organization such as Hamas is a major mistake that will cause a lot of damage to the future of the state of Israel," Olmert said. He focused much of his criticism on Mashaal, whom Israel accuses of masterminding the capture of the soldier.
Israeli troops entered the Gaza Strip on June 28 following the capture of the Israeli soldier, Cpl. Gilad Shalit, in a cross-border raid carried out by militants linked to the Hamas-led Palestinian government.
Israel expanded the operation last week into northern Gaza to halt months of rocket attacks. Tanks and ground forces have entered the area, and Israel has carried out numerous airstrikes, leading to widespread destruction.
"We have no particular desire to topple the Hamas government as a policy. We have a desire to stop terrorists from inflicting terror on the Israeli people," Olmert said, declining to give a timetable for the operation.
The Israeli invasion, arrests of Hamas Cabinet ministers and threats to assassinate the group's top leaders have prompted accusations that Israel is trying to destabilize the democratically elected government.
Mashaal also accused Israel and the United States of providing the "ugliest example of terrorism" in their dealings with the Palestinians, saying that Israel was breaking international law. He criticized the West for keeping silent on the Israeli offensive to free a captured Israeli soldier.
"The Palestinian people are facing consecutive strikes by the Zionist, aggressive and terrorist entity," Mashaal said.
"Today, Israel is really terrorizing our people ... Israel and America, which talked too much about this terrorism in past are the worst, severest and ugliest examples of terrorism."