Gordon Brown said the government was helping to minimise unemployment
Gordon Brown has been criticised after it was revealed the taxpayer-owned Royal Bank of Scotland is funding the takeover of Cadbury by a US company.
Liberal Democrat leader Nick Clegg said it was "plain wrong" the bank was lending money to Kraft, as its takeover could end up costing UK jobs.
Labour MP Tony Wright called the £11.5bn takeover plan an "outrage".
But, during prime minister's questions, Mr Brown said the government would do "everything we can" to protect jobs.
Kraft, the maker of Philadelphia cheese, announced on Tuesday that it had the backing of the Cadbury board for a revised 840p per share offer, which would end the independence of the British confectionery company dating back to 1824.
RBS is 84%-owned by taxpayers after being bailed out by the government.
During heated exchanges in the House of Commons, Mr Clegg said: "When British taxpayers bailed out the banks, they would never have believed that their money would now be used to put British people out of work. Isn't that just plain wrong?"
He said it was wrong for RBS to lend money to Kraft while British businesses struggled for credit.
Mr Clegg told MPs: "Last month [Business Secretary] Lord Mandelson declared that the government would mount a huge opposition to Kraft's takeover of Cadbury's.
"So why is it that Royal Bank of Scotland - which is owned by this government - should now want to lend vast amounts of our money to Kraft to fund that takeover?"
Mr Brown said: "If you are really suggesting that the government can step in and avoid any takeover that is taking place in this country and just do it overnight, and then tell a bank that it has got to deprive a particular company by government diktat, then your liberal principles seem to have gone to the wall."
He also said: "There is no government that is doing more to try and protect jobs and increase jobs in this country."
Mr Wright, MP for Cannock Chase, said City minister Lord Myners had recently complained it was "becoming too easy for good British companies to be taken over by foreign predators".
He added: "Now that we have had the outrage of Cadbury's, do you agree?"
Mr Brown said Cadbury employed thousands of people in the UK, adding: "It is a very important company for the future of this country.
"We are seeking assurance and have received information from Kraft about the importance they attach to the Cadbury workforce, to the Cadbury name and the Cadbury quality in the United Kingdom.
"We hope that the Kraft owners will make sure that Cadbury workers - the 5,500 - can retain their jobs and make sure that new investment goes into a product that is distinctly British and is sold throughout the world.
"So we will do everything we can to make sure that jobs and investment are maintained in Britain."
Mr Brown also highlighted official figures, released on Wednesday, which showed unemployment had fallen for the first time in almost two years and fewer people were claiming the jobseeker's allowance.
Liberal Democrat Treasury spokesman Vince Cable later wrote to Lord Mandelson telling him it was "perverse" for the largely state-owned RBS to be funding the takeover of Cadbury.
He said: "Cadbury is a national institution which provides thousands of jobs in the UK and there is a real danger its takeover by Kraft will lead to job losses."
On his blog, Treasury minister Liam Byrne, whose Birmingham Hodge Hill constituency is near Cadbury's Bournville plant, said: "Gutted. That sums up the way I feel about Kraft's takeover of Cadbury.
"So many of my friends, constituents and party members work there that today could never be anything other than a very, very sad day."
However, he added: "But our job now is to push hard to make sure Cadbury's goes from strength to new strength, wins in new markets and grows jobs here in Birmingham. That's the way we'll seize a silver lining in Cadbury's iconic purple wrappers."