Mr Miliband argued a political struggle alone may not have effected change
The Tories have criticised Foreign Secretary David Miliband for comments that they say could be seen to "legitimise terrorism".
Mr Miliband told the BBC violent action or terrorism may be justifiable in some cases, in a tribute to Joe Slovo, a South African anti-apartheid activist.
The Tories said the remarks undermined the sacrifices of troops devoted to defeating terrorists in Afghanistan.
The Foreign Office called the accusation "preposterous".
It said the comments, made on BBC Radio 4 programme Great Lives, were taken out of context.
A Foreign Office spokesperson said: "Matthew Parris's question about the ANC was much broader than reported, relating not only to terrorism but to 'violent reaction' as well.
"It stretches credibility to suggest any read-across from his remarks to the vicious terrorist threat we face nearly 30 years later."
Mr Slovo, a friend of Mr Miliband's father Ralph, was one of the leaders of Umkhonto we Sizwe (Spear of the Nation), the armed military wing of the ANC.
The group carried out a number of attacks during its campaign, including the Church Street bombing in Pretoria in 1983 where 19 people were killed and more than 200 wounded. Many victims were civilians.
Presenter Matthew Parris asked Mr Miliband: "Are there circumstances in which violent reaction, terrorism, is the right response?"
Mr Miliband said: "That's such a hard question, 'right' has to be judged in two ways doesn't it? Whether it's justifiable and whether it's effective.
"I think I'm right in saying that one of the ways in which the ANC tried to square the circle between being a movement of political change and a movement which used violence, was to target installations rather than people.
"The most famous ANC military attack was on the Sasol oil refinery in 1980. That was perceived to be remarkable blow at the heart of the South African regime.
"But I think the answer has to be yes - there are circumstances in which it is justifiable, and yes, there are circumstances in which it is effective - but it is never effective on its own."
He went on: "The importance for me is that the South African example proved something remarkable: the apartheid regime looked like a regime that would last forever, and it was blown down."
The foreign secretary went on to argue whether the action taken by the ANC was indeed "terrorism" and whether it was called such at the time.
Shadow foreign secretary William Hague condemned Mr Miliband for a failure of judgment.
"Ministers must be very careful before advancing any argument that seems to legitimise terrorism in some circumstances," he said.
"When so much of the efforts of our security services, and the sacrifices of our troops in Afghanistan, are devoted to defeating terrorists, this is hardly the time to argue that terrorism is sometimes acceptable."