The crafty caretaker with a sweeping agenda
Ehud Olmert's political career almost ended three years ago when he finished an embarrassing 33rd in Likud Party primaries for Knesset candidates, far behind lesser known figures. Luckily for him, 38 candidates on the list made it into the Israeli parliament.
His poor showing despite decades as a senior Likud politician reflected the low esteem in which he was held by his peers.
Apart from having a barbed tongue, he carried himself too high, was too given to pinstriped suits in an open-neck society, smoked expensive cigars and hung out with wealthy businessmen.
Even when he served as mayor of Jerusalem he seemed to be abroad on junkets as often as he was in the country. When he grew prosperous as head of a law firm, people suspected him of shady dealings. Indeed, several times he was the subject of police investigations but was never charged.
The press did not like him either, and not just because he responded aggressively when asked questions he did not like. One of Israel's leading journalists, Ari Shavit, once described Mr Olmert in the Haaretz newspaper as a cynical, self-serving politician - 'a constant traveller who had no hesitation about partying in foreign climes while his own city was under attack [a reference to suicide bombings in Jerusalem], a haughty cigar smoker with no feelings for the pain, poverty and despair of Jerusalem's residents.'
The only positive public perceptions of Mr Olmert was that he was intelligent and a capable administrator.
Mr Olmert, in short, would not have won any popularity contest. Yet this week he won a narrow endorsement from the Israeli electorate, which gave his Kadima Party 29 of 120 Knesset seats and paved the way for him to become prime minister.
His emergence as Israel's leader at 60 is due entirely to Ariel Sharon, who plucked him from the Likud margins to make him a senior minister, as well as his deputy and principal confidant. The trust placed in him by a man as respected as Mr Sharon altered the attitude of much of the public towards him since it suggested that the prime minister knew something about Mr Olmert that they did not.
In his three months as acting prime minister, Mr Olmert has himself helped this change in public perception by restrained and 'presidential' behaviour. His aides let it be known that he was working out of his old office and not entering the prime minister's office since he was only acting prime minister. At cabinet meetings, he left empty the chair normally occupied by Mr Sharon, who is still officially the prime minister. In his public appearances, he avoided his old sarcasm, even about political opponents.
Mr Olmert has undergone an ideological transformation since being born to one of the leaders of the far-right Herut Party, predecessor to the Likud Party. His father, Mordecai Olmert, immigrated from Russia in 1933 and served as a Herut Knesset member in the 1950s. Led by Menachem Begin, Herut advocated a Greater Israel.
Joining Herut upon completing his army service, the 21-year-old Mr Olmert wasted no time in making his name by standing up at a party conference to demand Begin's resignation for having led the party to a series of defeats. As one of the 'princes' of Herut - children of the party's leaders - he was forgiven his brashness. He completed law studies at Jerusalem's Hebrew University and in 1973, at 28, became the youngest person elected to the Knesset at that time.
Although the Greater Israel ideology on which Mr Olmert was raised extended only to historical Palestine, he displayed a strong urge for territorial expansion in other directions as well. In 1978, he again defied Begin, by then prime minister, by challenging his acceptance of the peace treaty offered by Egypt in return for Israel's pullback from Sinai. Mr Olmert believed retention of Sinai was more important than peace with Egypt.
Years later, when he himself was advocating withdrawal from the Gaza Strip, he admitted that he had gravely erred. 'He [Begin] was right and I was wrong. Thank God we pulled out of Sinai.'
Taking a 10-year break from national politics in 1993 to serve as mayor of Jerusalem, he remained as hawkish as ever, permitting development of Jewish housing in the midst of Arab areas. But towards the end of his mayoral term he began to undergo an ideological transformation. It may have been this change that brought him close to Mr Sharon, himself undergoing a similar transformation.
In December 2003, shortly after being elected to the current Knesset, Mr Olmert gave a remarkable interview to the newspaper Yedioth Ahronoth, revealing for the first time his deep opposition to continued occupation of the Palestinian territories. If Israel did not pull out, he warned, the Palestinian population would soon outnumber the Jews. In that case, Israel would either become an apartheid state that denied the vote to the Arabs or it would cease being a Jewish state.
Mr Sharon, surrounded mostly by hardliners in his Likud government, leaned increasingly on Mr Olmert as a politically savvy sounding board who had undergone a similar epiphany to his own. He also apparently used Mr Olmert as a stalking horse to test public sentiment in Israel and abroad. Before Mr Sharon spoke out on the subjects, Mr Olmert became a public advocate of the Gaza withdrawal and the construction of a security barrier on the West Bank. His was one of the principal voices who urged Mr Sharon to quit Likud as a vehicle incapable of furthering his new political goals, and to found a centrist party instead.
When, earlier this year, Mr Sharon was felled by a stroke, Mr Olmert took over the leadership of the country by virtue of his designation as acting prime minister. As a caretaker, he kept a low profile but at times he was obliged to make hard decisions. When the courts in February ordered the demolition of an illegal outpost, Mr Olmert sent 10,000 police and soldiers to disperse a mass protest by settlers and their supporters and thereby affirm his determination to carry out further evacuations in the future.
He waited, however, until two weeks before the election to step boldly out of Mr Sharon's shadow and spell out his own far-reaching plan for evacuating most of the Israeli settlements on the West Bank while holding on to large settlement blocs.
Mr Sharon had always been ambiguous about his plans. But Mr Olmert wanted to make it clear to voters what he intended to do and thereby pre-empt charges afterwards by the right wing that he had no public mandate for evacuating settlements. In voting for him, they would be voting for evacuation.
'This was the most specific plan any serious candidate for prime minister has ever issued before an election,' wrote one Israeli journalist.
Mr Olmert's performance as acting prime minister drew high praise from Israel's elder statesman, Shimon Peres, who said Mr Olmert had deftly walked the line between not flaunting his role as acting prime minister as long as Mr Sharon lay in hospital while at the same time giving the public the sense that there was no power vacuum in Jerusalem.
Nevertheless, it will probably take weeks before Mr Olmert can present a coalition government to the Knesset for approval. From that moment, he will not be the 'acting prime minister' on the basis of authority derived from Mr Sharon but a leader in his own right who will have to rely on courage and fortitude in dealing with the critical decisions that await him.
In a recent interview, Mr Olmert disclosed that his artist wife and their five children - one adopted - were all left-wingers who had never voted for him. 'There is a complex, and I think fascinating, dialogue between my children and me.'
Over time, said Mr Olmert, his family had influenced his political thinking more than he had influenced theirs.
Running for prime minister this week on a platform that advocates pulling out of the bulk of the West Bank, he said he was finally confident that his family was on his side in the polling booth.