The Labor Government holds power by one vote, with the support of Greens and independent MPs.
McClelland said yesterday he was considering his future, but Gillard was confident he would stay in Parliament: "He is a great Labor man from a great Labor family, and he will continue to serve the Labor Party."
Carr's surprise appointment yesterday means former Foreign Minister Stephen Smith will remain in the defence portfolio despite his bid to regain the job he surrendered to Rudd after Gillard's June 2010 coup.
The decision ends concern that defence would be again shaken by a fourth new minister in as many years, during a time of reform.
Rumours of Carr's impending appointment were reported earlier in the week, sparking claims that Gillard was acting without consulting caucus or other ministers and leading to denials from both of them.
But as the row grew and Carr said he would not be moving to Canberra, new reports said Gillard had been rolled by ministers including foreign affairs prospects Smith and Regions Minister Simon Crean.
Gillard was hammered by the Opposition and the media for her apparent failure of authority and poor political judgment in the handling of the reports, reopening wounds Labor hoped had been healed by the Prime Minister's decisive victory over Rudd.
But yesterday morning Carr appeared beside Gillard as she announced his appointment to the foreign affairs portfolio as part of a new Cabinet selected "on merit".
"He's now here because I made an offer to Bob Carr to serve as my Foreign Minister," Gillard said.
Carr said he had agreed with "warring emotions [and] two minds".
"But in the end when the distinctive voice of Prime Minister Gillard rouses you from your slumber and says, 'will you be Foreign Minister of Australia?', I could not have found it in me to have said no ...
"You don't choose the moment - very often the moment chooses you."
Carr said he was an "unbounded admirer" of Gillard and would seek the views of former Foreign Ministers, including Rudd, Liberal Alexander Downer and former Labor Senator Gareth Evans, and speak also to former Prime Ministers.
Carr has long resisted attempts to draft him into federal Parliament, but brings vast political experience and wide knowledge of international affairs and close links with Australia's major ally, the United States.
An honours history graduate and American Civil War enthusiast, he is on the US Studies Centre board and the advisory board of the Centre for Australian Studies at Washington DC's Georgetown University.
Rudd supporter Kim Carr will take over Human Services from Brendan O'Connor, who has been promoted to Cabinet as Minister for Small Business, Housing and Homelessness, and Senator Kate Lundy is now Sports Minister.
Bob Carr: New Man on the Block
* School dux, honours history graduate and former journalist, joined the Labor Party at 15 and elected to NSW Parliament in 1983.
* Held a series of portfolios before leading Labor in Opposition, became State Premier in 1995 after beating New Zealand-born Liberal John Fahey.
* In a 10-year term Carr was one of Australia's most popular leaders, vastly extending national forests, cleaning up Sydney Harbour, boosting recycling, and capping greenhouse emissions from electricity retailers.
* During his term educational standards also rose, health spending increased, the economy prospered and net state debt was cut to zero, despite big investments in road and rail infrastructure and complaints about rail inefficiency.
* Passed new anti-corruption laws against bitter opposition after a royal commission into the police that also uncovered institutional paedophilia and child-sex rings, and set up Australia's first legal injecting room for heroin addicts.
* Oversaw the 2000 Sydney Olympics, but quit in 2005 after polls turned against him.