His climb-down, forced on him by an economic crisis and his ill-judged decisions, was the biggest victory by the State Duma in its five-year life. After clamouring for more power, it has proved it can face down the Kremlin on an issue of primary importance. Mr Primakov, who will be confirmed by the Duma today, can expect to be more powerful than his predecessors. He is in charge - at least, for now.
While Mr Yeltsin endured a debacle that dragged on for a fortnight in the midst of economic meltdown, his loyal colleague, Viktor Chernomyrdin, suffered a far worse fate. Withdrawing his name from a third Duma vote he could only lose, the ex-prime minister's dream of becoming president has been shattered.
"I do not want to be a figure of civil discord ... The situation is heated to the limit," he said as he quit the field, a wounded figure who could not uncouple his name from the venality, crime and disarray that marred his six years in office. Twice rejected by the Duma, he left complaining that he was the victim of a "creeping coup".
Mr Primakov, 68, does not come to power willingly. He has said he does not want the job, and, given Russia's chaos and his years and uncertain health, this is more than false modesty. But he begins with broad political support. Parliament's main factions, including the Communists, signalled approval, having secured Mr Chernomyrdin's ejection and probably, although this was unclear, a power-sharing agreement giving parliament the right to vet Cabinet appointments. Opposition came only from the ludicrous nationalist, Vladimir Zhirinovsky.
Mr Primakov's appeal owes much to his own Everyman credentials. He spent five years as head of the foreign intelligence service, was a candidate member of the the Soviet Politburo and spent many years as a Pravda correspondent in the Middle East and Asia. Such orthodox party service will recommend him to the more regressive elements on the left. But he is also a liberal apparatchik from the Gorbachev era who pushed for rapprochement with the West. In the 1991 abortive coup, he issued a courageous statement condemning the plotters.
Appointed Foreign Secretary in January 1996, he earned a reputation for being anti-Western by trying to counter the US. But he was respected as a tough, realistic negotiator.
As he rarely says much about himself, Russians have little idea of what to expect. He has avoided aligning with any political faction, although he has been loyal to Mr Yeltsin. He has a reputation for being retiring, a reader of detective thrillers but has flashes of extroversion; brought up in bibulous Georgia, he is said to be an accomplished tamada, or toastmaster.
His appointment today will end a conflict that has paralysed Russia's government for two weeks, while an economic catastrophe unfolded, halving the value of the rouble and causing food shortages and fast-rising prices.
His arrival is the result of Mr Yeltsin's mistakes, the impulsive sacking of Mr Chernomyrdin in March and of Sergei Kiriyenko last month. These owed much to the business moguls who hover around the Kremlin; there is no evidence of any special relationship between the oligarchs and Mr Primakov.
So what can Russia expect? Mr Yeltsin phoned his friend Helmut Kohl yesterday and said "reforms" would continue. But there are far more pressing matters - a budget in ruins, collapsing banks. Although Mr Primakov is not economically illiterate, the global money, stock and currency markets are also not his speciality.
Western eyes will be fixed hopefully on the fortunes of the head of the liberal Yabloko party, Grigory Yavlinksy, the foremost supporter of Mr Primakov's premiership. He may be rewarded with a Cabinet job. In the end, this episode could have been worse for Mr Yeltsin. Mr Primakov is, at least, from his camp. Other candidates put forward by the Duma - the Communist, Yuri Maslyukov - would have involved a much more humiliating climb-down.
But the President does not usually make concessions; it is against his nature. Yesterday he had to. It meant delivering a victory to the legislature which history will see as symbolic revenge for the day he sent in the tanks in 1993.Reuse content