BRASÍLIA — President Jair Bolsonaro this week called on the armed forces to “commemorate” the 55th anniversary of a coup that installed a brutal military dictatorship in Brazil, igniting fierce debate over the legacy of that repressive era.

Mr. Bolsonaro, a former Army captain who ran on a far-right platform, has long been an apologist of Brazil’s military rulers, and has called the coup that ousted a leftist president on March 31, 1964, a triumphant strike against Communism.

Until recently, his was a fringe voice. The military regime that followed the coup used censorship and a repressive security apparatus to maintain control for 21 years, torturing and killing hundreds of suspected dissidents. Three of Brazil’s presidents since the country returned to democracy in the mid-1980s had opposed the military, and were themselves either exiled, jailed or tortured for it.

But the presidency has given Mr. Bolsonaro a powerful platform to thrust a revisionist version of that era into the mainstream.