Labour MPs voted overwhemingly on Monday night to reject the proposed new line-up for the foreign affairs select committee which Mr Anderson chaired in the last parliament.
It was a spectacular rebellion, backbenchers voting 301 to 232 to throw out the government's proposal.
The result of the free vote is seen as a massive defeat for the Labour leadership, which had been roundly accused of "control freakery," and a victory for freedom of expression.
'Triumph for parliament'
Mr Anderson, who won a 53.7% majority in Swansea East at the 2001 election, said it was a triumph for parliament.
"I didn't know I had so many friends," he joked after the vote. "I haven't taken on board yet the effect of what has happened to me.
"The real triumph is for parliament. The very clear message is that parliament is not going to be rolled over.
"Had parliament voted otherwise, it would have been a very clear signal that we might as well have packed up and gone home to leave it to the government.
"It was against all the politifcal wisdom because whips usually get their way."
New vote
A spokesman for Labour Chief Whip Hilary Armstrong - who had been charged with carrying out the sackings - said the government would listen to the will of the Commons.
"We will respond to the will of the House and a new list will be put forward to the parliamentary Labour Party on Wednesday morning and that list will include Donald Anderson and Gwyneth Dunwoody," the spokesman said.
Former Culture Secretary Chris Smith, who was expected to take Mr Anderson's place, has now backed out of the running.
That means both Mr Anderson and Mrs Dunwoody could both be reinstated this week.
Welsh Conservative spokesman and Tory party Vice Chairman Nigel Evans MP said it was a lesson for the government. He said they had better think carefully and not steamroller decisions through against the wishes of parliament.
Fiercely critical
The select committee system was implemented in parliament in 1980 to scrutinise the work of government.
In July 2000, a report from the Swansea East MP, who has represented the constituency since 1974, was fiercely critical of the Foreign Office's security and protection for British diplomats overseas following the terrorist murder of military attaché Brigadier Stephen Saunders in Athens.
He urged an urgent review of security precautions and called on the government to offer more money for protection.
But in 1999, Mr Anderson apologised to the government for leaking details of his committee's arms-to-Africa report to a Foreign Office official before publication.
The removal of Mrs Dunwoody on Monday was voted against by an even larger majority of 308 to 221.