Secretary of State James Baker III, National Security Adviser Brent Scowcroft, Soviet first lady Raisa Gorbachev, adviser Anatoly Chernyaev and President Mikhail Gorbachev at Camp David, in June 1990. (Anatoly Chernyaev Papers/National Security Archive)

Anatoly Chernyaev, an influential foreign policy adviser and speechwriter for Mikhail Gorbachev who argued passionately for military ­de-escalation and political openness while keeping a poignant, detailed personal diary of his observations during the final two decades of the Soviet Union, died March 12 in Moscow. He was 95.

The Gorbachev Foundation confirmed the death in a statement. Family members said he had been suffering from a ­respiratory illness.

Mr. Chernyaev, a World War II veteran who spent decades rising through the ranks of the Kremlin’s foreign policy establishment, came to larger attention as a member of a liberal circle of advisers to Gorbachev from 1986 until the fall of the Soviet Union in 1991.

Among Gorbachev’s most trusted confidants, he was a tireless proponent of the “new thinking” that would reform the Soviet Union after years of stagnation, demilitarizing its foreign policy and seeking glasnost, or ­openness, at home.

He urged Gorbachev to seek a historic reduction in nuclear arms with the United States; supported an immediate pullout of Soviet troops from Afghanistan, which the Russians invaded in 1979; and, as early as 1986, proposed considering the prospect of a unified Germany.

Mikhail Gorbachev and Anatoly Chernyaev in 2010. (National Security Archive)

He was a constant fixture at Gorbachev’s summits with ­President Ronald Reagan, British Prime Minister Margaret Thatcher and other world leaders. On the evening the Soviet Union fell, he was one of a few advisers who retreated with Gorbachev to the Kremlin’s half-lit Walnut Room to make mournful toasts over ­cognac. Both had sought reform, not the collapse of the Soviet Union.

“He was probably the most ­sincere and greatest supporter of Gorbachev’s policies and thinking,” said Pavel Palazhchenko, Gorbachev’s former chief ­English-language interpreter and the head of the Gorbachev ­Foundation’s media service. “Chernyaev viewed this as the opportunity of a lifetime to change foreign policy and, through that, to create conditions for real change at home in the Soviet Union.”

Despite shunning publicity — he often stood to the side during group photographs at summits — his influence was considerable. As Gorbachev planned a meeting with Reagan in 1986, Mr. Chernyaev told him that a planned suggestion for modest arms control provided by the Foreign Ministry was “no good.” (“Simply crap!” Gorbachev replied, according to a note by Mr. Chernyaev later published in his memoirs).

Earlier that year, Gorbachev had proposed abolishing nuclear weapons by the year 2000, a radical suggestion that many abroad interpreted as propaganda.

Mr. Chernyaev, seeking to implement the spirit of Gorbachev’s thinking, proposed making good on that statement, suggesting a significant reduction in strategic weapons as the focus of the meeting. “The main goal of Reykjavik, if I understood you correctly in the South, is to sweep Reagan off his feet by our bold, even ‘risky’ approach to the central problems of world politics,” he wrote about the 1986 summit in Iceland.

Gorbachev agreed, and with Reagan talked about the most far-reaching proposals to get rid of nuclear weapons ever discussed during the Cold War. The talks collapsed in disagreement over Reagan’s missile defense plans, but they provided the foundation for the 1987 Intermediate-Range Nuclear Forces Treaty that was the first to eliminate an entire class of nuclear arms.

Erudite and energetic, Mr. Chernyaev became an important vessel for those reform-minded officials in the Soviet bureaucracy who were dismayed by the rollback of the thaw following Joseph Stalin’s death in 1953 and the Soviet Union’s armed intervention in Czechoslovakia in the 1968 Prague Spring.

Anatoly Chernyaev (National Security Archive)

He was a decade older than Gorbachev, brought up in an intelligentsia circle in 1920s Moscow during the comparatively liberal years of Vladi­mir Lenin’s New Economic Policy, before Stalin came to power.

Even as a top adviser, he read voraciously (especially literature) and championed novels such as Anatoly Rybakov’s “Children of the Arbat” against the censor.

“What influenced Chernyaev and his closest contemporaries most profoundly was what he terms a ‘cult of culture’ — a passion for literature, history, and ideas — that understood Russia is an inextricable part of Western civilization,” Robert English, a scholar of international relations and Slavic languages and literature, wrote in an introduction to Mr. Chernyaev’s memoirs, “My Six Years with Gorbachev.”

Those dormant proponents of the new thinking were energized by the rise of Gorbachev, whose support for reform was “like a ray of light,” said Svetlana Savranskaya, a senior research fellow at George Washington University’s National Security Archive who edited the translations of the meticulous diaries that Mr. Chernyaev had kept since 1972.

Mr. Chernyaev was effusive in his praise of Gorbachev, particularly in the latter’s early years as general secretary of the Community Party from 1985 to 1987.

“We’ve got a rare leader: a very smart man, educated, ‘alive,’ honest, with ideas and imagination. And he is brave,” Mr. Chernyaev wrote in January 1986, shortly before he was tapped as foreign policy adviser.

That admiration was strained in the later years of perestroika. He recognized early the growing backlash against Gorbachev, and dictated a scathing letter of resignation following the deaths of anti-Soviet protesters in Lithuania in 1991. He never submitted it.

At times, his prose could cut.

“He is isolated,” he wrote of Gorbachev on July 8, 1990, during the last congress of the Communist Party of the Soviet Union. “He blames his opponents for not realizing that we are living in an already different society. But he does not realize it himself, because his view of ‘a different society’ does not correspond to what it is in reality. And for the most part, in reality it turned out to be bad, not good — as he expected it to be when he gave it freedom.”

Anatoly Sergeevich Chernyaev was born in Moscow on May 25, 1921, into the family of a former tsarist officer.

He fought against Nazi Germany during World War II as a platoon commander in the Baltics, hiding a lifelong asthmatic condition to avoid disqualification from military service.

After returning from war, he graduated with a history degree in 1949 from Moscow State University and then taught at his alma mater for much of the next decade. After a three-year stint working in Prague at the magazine Problems of Peace and Socialism, an unintentional incubator for liberal Soviet officials, he joined the international department of the Central Committee of the Communist Party of the Soviet Union. He became deputy head of the department in 1970.

He was considering retirement by the time Gorbachev hand-picked him as his foreign policy adviser 16 years later.

“I’m tired,” he wrote then in his diary. “I am 65, I want a steady life, more rest and more time for myself, books, exhibitions, theater, the Conservatory, for the loved ones and other women. The bustling position of an adviser does not suit me.”

Nonetheless, he consented.

His wife of 47 years, the former Genya Solomonovna Vaynberg, died in 2005. Survivors include his companion of 12 years, Lyudmila Rudakova of Moscow; a daughter from his marriage, Anna Chernyaeva of Moscow; and a grandson.

After 1991, he collaborated with the Gorbachev Foundation and also published books. In 2004, he donated the copies of his diaries covering 1972 to 1991 to the ­National Security Archive, an ­anti-secrecy organization. Savranskaya said he did so ­because he feared they may not remain publicly accessible in ­Russia.

His views had soured about the political direction of Russia recently under President Vladimir Putin. “He was grieving,” Savranskaya said. “The political direction was so dark and negative, that sometimes he would say, ‘I wish we didn’t live to see it.’ ”

CORRECTION: The obituary incorrectly reported Mr. Chernyaev’s birthday as May 26, 1921, and the year he donated his diaries to the National Security Archive as 1994. His birthday is May 25, 1921, and he donated his diaries in 2004. The story has been revised.