Suleyman Demirel, one of the dominant figures in Turkey's politics for the past half-century, died early Wednesday, hospital officials said. He was 90.

Demirel died at 2:05 a.m. Wednesday at Ankara's Guven Hospital of heart failure and a respiratory tract infection, doctors at the hospital said in an announcement broadcast on Turkish television.

Demirel served as president from 1993-2000, the culmination of a four-decade career that saw him serve five spells as prime minister -- two of them ending in his government's overthrow by military coups.

Demirel believed that his governments of the 1960s and 1970s deserved much of the credit for a deep transformation of Turkey's economy and society, which saw a largely agrarian society transformed into an increasingly industrial and urban one, bringing higher living standards for most Turks.

But critics say Demirel symbolized a culture in which power came before principles, and helped entrench patronage and graft. They point to a notorious "family photograph," which pictured Demirel surrounded by relatives and associates from the business world -- some of whom were later jailed for corruption.

Demirel launched his political career in the aftermath of the 1960 military coup that deposed the government of Adnan Menderes. Menderes and two Cabinet colleagues were executed, and many leading figures in their party were banned from politics -- leaving a vacuum on the center-right.

Into that gap strode the political unknown Demirel. He had trained as an engineer, and headed a dam-building program under Menderes before leaving for the private sector.

At the age of 40 -- youthful by Turkish political standards, then and now -- Demirel was a surprise choice as leader of the newly formed Justice Party, a center-right successor to Menderes' party.

The first leading politician from a younger generation that had played no part in the formation of a modern, independent Turkish state after World War I, Demirel came to power with a landslide win in 1965.

His populist style -- Demirel was known as "Sulu the shepherd" because of his village background -- and his canny use of the symbols of Islam proved a vote-winner in the conservative countryside, where most Turks lived. His government had to balance the demands of its rural support base with the need to push Turkey into the industrial era.

The balancing act seemed to be working in the mid-1960s, with annual growth of around 6 percent a year as electricity and roads reached corners of Turkey that had never seen either.

But by 1970, Demirel was on the defensive as rising political radicalism brought social unrest. On the left, students and workers groups demanded radical reform, while Demirel was being outflanked on the right by new nationalist and pro-Islamic parties.

When the ideological conflict started to turn violent, Turkey's powerful military intervened. Generals issued an ultimatum that forced Demirel out of office in 1971 in the so-called "coup by memorandum."

Successive governments, led first by military-backed technocrats and then by Demirel's great rival Bulent Ecevit, failed to get a grip on the spiraling violence, which worsened in the 1970s as Turkey's economy, hit by the oil price crisis, slumped into crisis.

Demirel was back in power in 1975, but his unwieldy coalition -- including Islamists and nationalists -- couldn't halt Turkey's slide into chaos. Many blamed Demirel for turning a blind eye to his nationalist coalition partners, who openly incited violence that saw dozens killed weekly in clashes between left- and right-wing gangs.

Turkey was heading toward another military coup, which arrived in 1980.

According to late journalist Mehmet Ali Birand's account of the coup, Demirel was on the telephone to his interior minister on the night of Sept. 11, 1980, when the line went dead. Looking out of the window of the prime minister's residence, he saw that his usual bodyguards had been replaced by armed soldiers.

"It is a pity, a pity for the motherland, a pity for us all," the outgoing premier said, before packing his bags for prison.

Demirel was banned from politics, but the ban was repealed in the late 1980s. He became prime minister again in 1991, and president in 1993 on the death of Turgut Ozal.

As president, Demirel fostered ties with the Turkic republics of the former Soviet Union, and took credit for brokering the peaceful ouster from power of an Islamist government under pressure from the secular-minded military in 1997, at a time when many feared a coup. The ouster was later dubbed Turkey's "postmodern coup."

A favorite slogan of Demirel's, used to counter critics who accused him of U-turns and inconsistencies, is often quoted by Turks discussing the pragmatic leader's political strengths and weaknesses.

"Yesterday was yesterday -- and today is today," Demirel was fond of telling journalists.

Demirel's wife, Nazmiye, died in May 2013. The couple had no children.