BRASILIA (Reuters) - The government of Brazil’s right-wing President Jair Bolsonaro has rejected an appeal by a United Nations expert not to revise Brazilian history by denying a military coup occurred in 1964.

Slideshow ( 3 images )

In a letter to the U.N. human rights commission in Geneva made public on Thursday, the government said it “repudiates the baseless allegations” of the U.N. expert who criticized Bolsonaro’s decision to commemorate the 1964 military uprising as an attempt to condone rights violations.

“President Bolsonaro has reiterated his understanding that the 1964 movement was necessary to stave off the growing threat of a communist takeover of Brazil and to ensure the preservation of national institutions in the context of the Cold War,” the letter said.

According to Bolsonaro, the overthrow of an elected leftist government was not a coup d’etat, but a legitimate movement backed by the country’s Congress and judiciary, as well as the majority of Brazilians, the letter said.

Brazil’s armed forces on Sunday paid tribute to the 1964 coup that lead to a two-decade military dictatorship at the behest of Bolsonaro, who reversed an eight-year-ban on celebrations.

The move stirred debate and underscored Bolsonaro’s support for a military government that executed hundreds, tortured thousands, shuttered Congress and left most Brazilians with dark memories of the period.

Two days earlier in Geneva, Fabian Salvioli, the U.N. expert who wrote the letter and a human rights lawyer and professor, called on the Bolsonaro government to reconsider the commemoration.

“Attempts to revise history and justify or condone gross human rights violations of the past must be clearly rejected by all authorities and society as a whole,” Salvioli said.

Bolsonaro, a former Army captain, has long praised the 1964-85 military government and often said its biggest mistake was not killing enough leftists.

Pushing the U.N. appeal aside, his government is moving ahead with rewriting history.

Education Minister Ricardo Velez said in an interview published on Wednesday that school history books will be edited to give a “broader” view of what happened in 1964.

He told Valor Economico newspaper that there was no coup and the military regime that followed was not a dictatorship.