Former Scottish first minister, Jack McConnell, has been appointed to a part-time diplomatic post, working with nations recovering from conflict.
Prime Minister Gordon Brown's appointment avoids Labour having to fight a by-election in Mr McConnell's Motherwell and Wishaw constituency.
Mr McConnell, who was due to become high commissioner in Malawi in the New Year, insisted it was a "serious" post.
Labour is already facing a tough fight in the Glenrothes by-election.
The ballot, following the death of Labour MP John MacDougall, is expected in November.
Mr McConnell would have caused a by-election by taking up the Malawi post, which is now on hold.
He will instead will work as an un-paid special envoy, part-time at the Foreign Office, drawing up a plan for rebuilding capacity in areas blighted by conflict such as as Rwanda and Kosovo.
Scottish First Minister Alex Salmond said the creation of the job was "blatant political manipulation in order to avoid defeat in a by-election".
He added: "It is a sign of how out of touch they are that Labour think they can manipulate the process in this way, but sooner or later people are going to say to Labour 'enough is enough'."
But Mr McConnell, who accused his successor as first minister of taking a small-minded approach, said: "Having visited Rwanda in the last year and seen the devastation caused by international conflict, I know that it is serious job to deal with serious issues."
Mr McConnell said he had also received "considerable representations" from people in Motherwell and Wishaw asking him to stay on as an MSP.