The cabinet vacancy created by finance minister Avraham Hirchson's resignation Sunday created as many problems for Prime Minister Ehud Olmert as opportunities, but signs are he is managing to turn the situation to his political advantage. The departure of Hirchson, his oldest ally in government, was a blow, weakening him within the cabinet and Kadima as a whole, and leaving the ministry closest to his heart without a trustee at the helm. Unlike the Justice Ministry, where he placed two short-term replacements before settling on Prof. Daniel Friedmann, Olmert had relied on no one but himself to temporarily fill Hirchson's place at the Treasury. Now that he is finally being forced to let it go, not only does he have to come up with a trustworthy replacement, but he is also going to have to disappoint someone. Here's where Haim Ramon comes into the picture, somewhat problematically. The prime minister could easily avoid any trouble here and leave on the backbenches the MK who was convicted of an indecent act and got off with community service and no legal bar from returning to public office. Unlike other Kadima members left out of the cabinet, Ramon is extremely unlikely to become a rebel. At the most, he could simply retire from politics. And besides, reappointing him as a minister would certainly stir up the feminists' and governance movements and most likely Supreme Court petitions. But Olmert desperately wants Ramon back in the fold, and not just for reasons of friendship and their common love of watching football. Ramon is the only politician whose loyalty and political capabilities are completely trusted by Olmert. Despite having been in opposing parties for most of their political lives, Olmert in the Likud and Ramon in Labor, the two are soul-mates. Both are professionals, practitioners of attack politics, simultaneously capable of charming and savaging their opponents. Both took unorthodox career moves, Olmert in leaving the Knesset for the Jerusalem mayoralty and Ramon in taking over the Histadrut trade union federation. Both have broken with their parties, as young MKs defying old leaders. Finally joining forces in Kadima a year and a half ago was the most natural thing for the two. There is no question that if there were no legal, political or PR impediments, Ramon would already have the Treasury job. But Olmert has to take care of another loyalist. Interior Minister Roni Bar-On is in some ways a kind of Ramon II. He doesn't go back that far with Olmert; in the past they were even rivals in the Likud's Jerusalem branch. Neither does the second-term Knesset member and cabinet newcomer have anything approaching Ramon's experience in back-room dealing. But still, over the last year, Bar-On has been Olmert's main enforcer, filling in for Ramon after the indecent act case put him out of commission and remaining true in the PM's darkest moments when an insurrection within Kadima seemed imminent. Bar-On wanted to get Ramon's old job at Justice, but took it like a man when Friedmann was appointed. A second disappointment might not be easily absorbed. Olmert's all-but-certain decision - to give Bar-On the Treasury and bring Ramon back into the cabinet on President-elect Shimon Peres's spot as Vice Premier - is designed to keep both his political bodyguards close to him and satisfied. From a purely legal point of view, there is no difference between the appointments (the vice premiership is even more senior by law) and the same objections to Ramon's return might emerge. But the hope is that since he will effectively be a minister without portfolio, rather than getting the high-profile finance job, the outcry will be muted. Olmert is sending a clear signal to Labor and its new leader, Defense Minister Ehud Barak, on the same day that the Labor central committee voted on a resolution to leave Olmert's government by the time the Winograd Commission publishes it final report. If Ramon has one mortal enemy in politics, it's Barak. Both still blame each other for Labor's wafer-thin defeat in the 1996 general elections, and they haven't gotten along since. By appointing Ramon to his cabinet and giving him responsibility for high-profile diplomatic negotiations, Olmert would be staking out territory. He won't allow Barak to take up all the limelight and show he is the only serious person in the cabinet. This is also a signal to would-be Kadima leadership rivals - to Foreign Minister Tzipi Livni, whose role will be further diminished if Ramon takes over part of her portfolio; and to Construction and Housing Minister Meir Sheetrit and Transportation Minister Shaul Mofaz, both denied promotion in this reshuffle (though Sheetrit might go sideways to the vacated Interior Ministry). The prime minister, runs the subtext, is planning to fight them every step of the way if they challenge his place at the party helm, and he has placed his most trusted lieutenants in strategic positions. The government has to pass the next state budget to survive. Bar-On will have the job of cajoling, threatening and striking deals with recalcitrant MKs to ensure that. But the real threat to Olmert is Labor pulling out over Winograd. That could trigger either a palace coup in Kadima or new elections. That's where Ramon, the Knesset's resident expert in coalition-building, comes in. Without Labor, the coalition has only 59 MKs and will quickly fall. But there is a solution. Little United Torah Judaism has been poised to join since the election 16 months ago, and Ramon was in charge of the unconsummated talks, which fizzled out when he had to dedicate himself to his legal problems. His job this time will be to do whatever it takes to reach an agreement with UTJ before Barak blinks, and to make sure that the other coalition parties - Shas, Israel Beiteinu and Gil Pensioners - don't bolt either. He will likely have carte blanche to offer whatever is necessary to ensure the maintenance of a Knesset majority. If anyone can keep a coalition afloat, it is Ramon.