The Brazilian defence minister has resigned from his post following a row with the army over the country's 1964-85 military dictatorship.
Viegas oversaw the dispatch of peacekeeping troops to Haiti
Jose Viegas was angered by a statement issued by the army which defended the conduct of the military government.
He tendered his resignation nearly two weeks ago but it was only publicly accepted by President Luiz Inacio Lula da Silva ("Lula") on Thursday.
Vice-President Jose Alencar has been named as his successor.
The row erupted on 17 October when a newspaper published photographs of a naked man in a prison cell, said to be a journalist who died in military custody in 1975.
In response, the Brazilian army put out a statement defending the military government's actions, which it suggested constituted "a legitimate answer to the violence of those who refused dialogue".
The statement was not cleared with politicians, and a furious Mr Viegas failed to be pacified by a later statement from an army commander regretting the deaths of political prisoners.
In his resignation letter, Mr Viegas said the army statement, "in totally inadequate language, tried to justify deplorable episodes from the past".
The statement "represents the persistence of an authoritarian thinking, connected to an old and anachronistic doctrine of national security, incompatible with democracy and Brazil in the 21st century," he said, in a copy of the letter published by news service Folha Online.
The military ruled Brazil by decree, giving free reign to army units repressing dissenters and imposing harsh restrictions on the press.
Some 400 opposition figures were killed, and many more faced kidnap and torture.
Like many other South American nations, evidence of the abuses of the military dictatorship has been kept classified.
What makes this all the more explosive is the fact that some of those who opposed the military regime are now members of Lula's left-leaning government, says the BBC's Steve Kingstone in Sao Paulo.
In 1980 Lula himself was briefly imprisoned, he says.
Mr Viegas oversaw the dispatch of Brazilian troops as part of a peacekeeping mission to Haiti, and a new law allowing suspected drug-smuggling aircraft to be shot down over the Amazon.