In 2005 at the height of the “Hello Garci” scandal, Fidel Valdez Ramos played a crucial role in keeping then-president Gloria Macapagal Arroyo from leaving office.

There was tremendous pressure within her own Cabinet for Arroyo to step down from power after the wiretap recordings of her conversation with an election official surfaced.

But Ramos stood beside her, changing her decision to quit and hardening her position. She weathered all impeachment attempts and military attempts to seize state power.

Some people criticized Ramos for propping up the corrupt Arroyo government and more than a decade later when he openly supported Rodrigo Duterte in the 2016 elections, serving as a special envoy to China as Manila sought to repair relations with Beijing.

Looking back, one has to understand the late general and statesman for making those bad decisions and actions. He had regretted those decisions, particularly in supporting Duterte.

But he had his own reasons for preventing Arroyo from resigning in 2005.

First, he thought there was no real groundswell for Arroyo’s ouster unlike in February 1986 when he joined former defense minister Juan Ponce Enrile in breaking away from the dictator Ferdinand Marcos.

He saw his role in the EDSA People Power uprising as an atonement for his sins during martial law.

In 2005, he thought that it was only a group of people with vested interests who wanted a duly elected leader to be removed from position due to allegations of electoral fraud.

He might have been wrong.

But Ramos was a man who wanted to protect his own legacy.

He wanted to be remembered as the general who restored and guarded democracy from power grabbers, and introduced reforms to help the country rise as an economic tiger.

He broke up monopolies, partnered with the private sector to upgrade the creaking infrastructure, and sold nonperforming government assets and provided political stability by ending rebellions through peaceful negotiations.

He had a vision of a stable and progressive Philippines and he remained focused on that dream by reminding the Filipino people to unite and work closely with the government, a slogan he kept on repeating long before Ferdinand Marcos Jr. won on the platform of unity.

Ramos’ “Unity, Solidarity and Teamwork” (UST), which had been the main theme of his speeches during his six-year term, was pretty boring for many journalists, at that time, because they were used to the uncertainties and upheavals during the turbulent period under Cory Aquino.

There were more than half a dozen serious attempts during Aquino’s term, an intensified guerrilla warfare by the communists, and destructive disasters like the Mount Pinatubo eruption and an earthquake in northern Luzon that killed more than 1,600 people.

The Ramos years were marked with political stability. The main Muslim secessionist group, the Moro National Liberation Front, accepted and signed a peace deal offering self-rule for Muslim provinces in the south.

The right-wing forces who tried to unseat Cory Aquino also agreed to a peace deal that reinstated some soldiers.

Several important documents were signed with the Maoist-led rebel group, laying the foundation for a political settlement of the three-decade-old conflict that has killed more than 40,000 people.

Ramos was jealous about his legacy as the guardian of democracy. He had resisted efforts by some soldiers to turn against Cory Aquino, particularly during the November 1986 “God Save the Queen” plot.

He saved Aquino more than six times and had to ask for US intervention in the December 1989 coup when rogue soldiers had the upper hand and some soldiers were wavering on their support to the government.

When he was president, he also resisted efforts by allies to amend the Constitution and extend his single six-year term through a signature initiative.

Many thought he was behind the “PIRMA” initiative. He could have entertained the idea of extending his term but his heart told him to be loyal and faithful to the Constitution. Ramos would not want to be remembered as a power-hungry leader.

He was the best-ever president in the post-EDSA period but he was not perfect.

Corruption hounded his administration, like the PEA-Amari land deal and the centennial city in Clark. He was blamed for the high power rates because he swallowed a bitter pill to end the debilitating 12-hour daily power outages in 1992.

Cory Aquino never built a single power plant in the six years she was in office and demand for power grew as the economy improved after her term stabilized in the last two years.

Ramos was forced to accept the higher ROI demand of businessmen for their power projects and agree to expensive stopgap measures of power barges and generators.

Dirty coal plants were built because gas turbines were expensive and about 90 percent of the country’s crude requirements were imported from the Middle East. Coal was cheap and abundant in neighboring Indonesia.

Ramos also relied on diplomacy as the country faced a rising China which stepped into the vacuum left by the United States, which was kicked out from its two large bases in Clark and Subic.

Ramos ran to Asean and other allies after the military’s weak capability was exposed. The dictator had relied so much on the US for its external defense, focusing on confronting domestic threats from communist and secessionist rebels.

The Philippines had no air force and navy. It had a fleet of World War II vintage vessels and Vietnam War-era helicopters and 1960s fighters. It could not do anything when Beijing occupied a half-submerged Mischief Reef in the Spratly.

But the modernization program and the bases conversion program under Ramos did not produce results. Congress only funded the P150-billion modernization law with an initial P50 billion.

The P17-billion payment for Fort Bonifacio and Villamor Air Base started trickling in only during Arroyo’s administration as the 1997 financial crisis had badly affected the economy.

There were many serious problems during the six years Ramos was in power but there was relative stability and some prosperity. The leader with a vast military and engineering background had more successes in managing the economy.

All the infrastructure projects under Benigno Aquino’s Public-Private Partnership (PPP) and Duterte’s “Build, Build, Build” programs started under Ramos.

The tax efficiency rate was the highest at 17 percent under Ramos, giving enough legroom to pursue ambitious projects, like the North-South Skyway and the mass transit system on EDSA.

The best years of the Philippines was under Ramos from 1992 to 1998.

That is the legacy left behind by Fidel Ramos, the 12th president of the Philippine Republic.