Constantine Stephanopoulos, a veteran conservative politician who served two terms as president of Greece from 1995 to 2005, died Nov. 20 at a hospital in Athens. He was 90.

A statement from the hospital said the cause was complications from pneumonia.

Mr. Stephanopoulos twice failed to win the leadership of the conservative New Democracy party and then formed a splinter party that remained marginal before being dissolved. He was first elected to the presidency by Parliament on the third ballot with support from the social-democratic Panhellenic Socialist Movement (PASOK) party and a smaller conservative party, defeating the New Democracy candidate.

He found unexpected popularity in the last years of his presidency. His moderation and lack of bombast made him well liked by the public, and he maintained good relations across the political spectrum, especially with moderate socialist Costas Simitis, who was prime minister from 1996 to 2004.

His widespread acceptance was reflected in the reaction from political leaders after his death.

“A moral man with a lofty vision,” said leftist Prime Minister Alexis Tsipras. President Prokopis Pavlopoulos, a conservative, called Mr. Stephanopoulos “a model of selfless, dignified and consistent service for the public good.”

Mr. Stephanopoulos — known widely as Costis, his first name diminutive — was not always considered a moderate. For much of his political career, he was seen as a conservative hard-liner. In the 1970s, he caused an uproar when he denied that the smog regularly enveloping Athens was dangerous.

“Bring me a dead body to convince me,” he said at the time. Years later, he said that he regretted that statement.

Mr. Stephanopoulos was aware of the limits of the largely ceremonial presidency. On one occasion, he told a Socialist minister who had arrived early for an official function and was reluctant to join him at his office: “Are you one of those who believe the president has work to do? I sit around most of the time.”

But he used the office’s pulpit effectively, as when he lectured, in measured tones, visiting President Bill Clinton, in 1999, about his country’s meddling in Greece’s internal affairs, culminating with support for the 1967 to 1974 military dictatorship. Clinton responded by apologizing for past U.S. policy failures.

Mr. Stephanopoulos, the son of a lawyer and politician, was born in the western city of Patras on Aug. 15, 1926. In his youth, he was involved in sports, notably swimming and water polo, before starting a career as a lawyer.

He was first elected to Parliament in 1961, and became deputy trade minister in the civilian government that followed the fall of the military junta, in July 1974. He held various posts in New Democracy governments as the interior, social services and civil service minister.

Following New Democracy’s loss in the 1981 election, he was a minor candidate for the party’s leadership. In 1984, he sought the leadership again but was a runner-up to Constantine Mitsotakis, the father of the current conservative leader.

The following year, he split from New Democracy, forming the Democratic Renewal Party, under whose banner he was elected to Parliament in 1985 and 1989. But the party failed to gain a significant following and he disbanded it in 1994.

There was no immediate information available on survivors.

— Associated Press