WASHINGTON—The head of the Peruvian army, Gen. Otto Guibovich, recently made an important gesture for ethical military-civilian relations in his country. Calling it an act of “reconciliation,” he offered his cooperation to a memorial honoring the victims of the war that the “Shining Path” terrorist organization waged in the 1980s and ’90s, when thousands of Peruvians were killed, democracy succumbed and the state committed numerous atrocities.

Gen. Guibovich’s courageous step toward healing the nation’s wounds is a teaching moment for soldiers and civilians.

During Alberto Fujimori’s regime in the 1990s, Vladimiro Montesinos, a captain who had been sentenced for treason in the 1970s for selling state secrets, became the power behind the throne and took control of all institutions including the military. He inflicted on its top officers, whom he bribed, a document by which they vowed to defend the leaders of the 1992 coup in which Fujimori obtained dictatorial power and all those accused of human rights violations—a blanket protection that extended to the infamous death squad known as “Colina.”

Today’s armed forces mostly remember that era with contempt for those who imposed such moral degradation. But the efforts to reconcile the military and civil society around the values of freedom and the rule of law continue to face enemies—among them, political and media supporters of the dictatorship who strive to undermine democracy even though a majority of citizens now repudiate the Fujimori legacy.

Which is why Guibovich, who is interested in exorcizing the troubled past and modernizing the mindset, structure and methods of operation of the military, is a key figure in attempts to move Peru forward. In the decade since the country liberated itself from the dictatorship, a first-world dynamic has emerged, particularly in the economy. Yet with regard to the state’s institutions and the quality of public discourse, a pitiful degradation has taken place. The general’s recognition of the importance of reconciliation marks an elevated contrast.

I asked Gen. Douglas Fraser, the head of U.S. Southern Command, and Ambassador Claudio Bisogniero, NATO’s deputy secretary-general, what international precedents there are for efforts at reconciliation coming from a country’s military.

They listed these examples: In 2004, Gen. Juan Emilio Cheyre, commander in chief of the Chilean army, acknowledged the suffering of the victims of Augusto Pinochet’s government, stating in a public document that “human rights violations can never be justified.”

In 1995, Lt. Gen. Martin Balza, the Argentine army’s chief of staff, shook his compatriots’ conscience when he denounced the crimes committed by the dictatorship that ruled between 1976 and 1983.

In particular, history has reserved a place of honor for Gen. Gutierrez Mellado, the Spanish army’s chief of staff during that country’s transition from Francisco Franco’s dictatorship to a democracy. Although he had moved up the ranks under “Franquismo,” his leadership was crucial later in inculcating on his soldiers the values that gave Spain what today passes for a model of military-civilian relations around the world.

Scholar Dankwart Rustow’s famous article “Transitions to Democracy,” published in the journal Comparative Politics, earned him the title of “transitologist.” In his essay, he debunked the idea that no political transition was possible without two prerequisites: cultural and economic progress. Studying Turkey and Sweden, Rustow argued that the indispensable factor was a consensus of the elites. The transition, he concluded, ended with the “habituation” of the general population to the new rules and values.

The successful democratic transitions of Spain, Portugal and Greece, which took place relatively soon after Rustow published his essay, seemed to validate those assertions. So did Chile’s some years later. In all cases, the consensus would not have been possible without generals who had the courage to confront the past and understand that their challenge was to integrate the military into civil society as far as possible.

Narcis Serra, who was Spain’s defense minister for eight years and became an adviser to Latin American governments, explained something similar in his book “The Military Transition.” He argued that the modern military-civilian relationship requires that the military act not as an autonomous entity in dialogue with the state but as a full part of the administration, and not as a fortress isolated from civil society but as an organization that adopts its values and methods. Only then can the 2,000-year-old satirical question posed by Latin poet Juvenal—“Who watches the watchmen?”—be answered.

The Peruvian army seems to have in Gen. Guibovich someone who understands that the greatest war a soldier must win is that of civilization if the words “homeland,” “honor” and “glory” are to be charged with meaning.