Richard Pipes, a pre-eminent Harvard scholar of Russian and Soviet history, whose forceful opposition to accommodation with the Soviets was a cornerstone of President Ronald Reagan’s foreign policy, died May 17 at a nursing home in Belmont, Mass. He was 94.

A son, historian and writer Daniel Pipes, confirmed the death and said there was no specific cause.

Dr. Pipes was perhaps best known for his magisterial studies of Russia before and after the 1917 revolution, which he called “arguably the most important event” of the 20th century.

Unlike many historians, who saw the revolution as a proletarian uprising or as an outpouring of high-minded socialist ideals, Dr. Pipes had little but contempt for the Bolshevik rebellion and the regime that emerged from it.

He also harbored few illusions about the pre-revolutionary Russia of the Romanov monarchy, describing it in his 1974 book “Russia Under the Old Regime” as a system rife with corruption, violence and terrorism. But he considered the Communist-led Russian Revolution and its aftermath even worse.

“He’s fundamentally changed the way people view Russia,” historian S. Frederick Starr told the Boston Globe in 1999.

Dr. Pipes dismissed the revolution’s intellectual leader, Vladi­mir Lenin, as a power-hungry thug with a “strong streak of cruelty,” whose policies led directly to the repressive, murderous regime of Joseph Stalin.

“Can one — should one — view such an unprecedented calamity with dispassion?” Dr. Pipes wrote in his 1995 book “A Concise History of the Russian Revolution.”

Notable deaths in 2018 and 2019: Nipsey Hussle, George H.W. Bush, Stan Lee, John McCain, Aretha Franklin and other famous faces we’ve lost

Nipsey Hussle, a Grammy nominated rapper who sought to revive South Los Angeles, died at age 33 on March 31. Read the obituary (Matt Winkelmeyer/Getty Images for Warner Music)

His views often set him apart from other academic historians, whom he sometimes dismissed as apologists who didn’t understand the real-world consequences of authoritarian rule.

“They write bloodless history about a time that drowned in blood,” he wrote in his 2003 memoir, “Vixi.”

Nonetheless, Dr. Pipes was widely respected for his painstaking research and powerful writing. His scholarship gained an added measure of validity from his experiences growing up in Poland, one of Russia’s neighbors.

“When you live next to these people,” he told the Globe in 1991, “you know some things; for instance, that the Russians can be a brutal people.”

The Soviet Union long considered Dr. Pipes to be persona non grata. He could not be quoted in media reports, and the Kremlin authorized a book called “Richard Pipes: Falsifier of History” — which Dr. Pipes gleefully distributed to visitors at his Harvard office.

He was also a steadfast opponent of open-ended cooperation the Soviet Union, believing that the Cold War would end only when the Soviets were confronted with overwhelming U.S. military might.

In 1976, Dr. Pipes was tapped by then-CIA director George H.W. Bush to lead an assessment of Soviet military strength. His group of outside experts was dubbed “Team B” and was charged with coming up with estimates independent of an earlier report from a group of government analysts called “Team A.”

Dr. Pipes’s team determined that the longtime U.S. policy toward the Soviet Union of arms reduction and detente was a failure. He believed that the Soviets were willing to risk nuclear war and would abandon the arms race only if confronted with overwhelming U.S. military strength.

The doctrine was put into practice after Reagan was elected president in 1980. Dr. Pipes was named to the National Security Council and, as the resident Soviet expert, had a key role in formulating a tougher U.S. stance toward the Soviet Union. He helped write one of Reagan’s most memorable speeches, delivered before the British parliament in 1982, when the president foretold a “march of freedom and democracy which will leave Marxism-Leninism on the ash heap of history.”

Dr. Pipes left the Reagan administration at the end of 1982 and returned to Harvard. With the collapse of the Soviet Union several years later, he felt vindicated.

“I used to be ignored, then they absolutely hated me,” he said in 1991. “Now I’m seen as a man who told the truth.”

Richard Edgar Pipes was born July 11, 1923, in Cieszyn, Poland, and grew up in Warsaw in a middle-class Jewish family. His father was a businessman, his mother a homemaker.

During his youth, Dr. Pipes spoke German and Polish and considered becoming a musicologist or art historian. As the German Luftwaffe bombed Warsaw, he recalled in his memoir “Vixi” — Latin for “I lived” — “I slept alone on the sixth floor reading Nietzsche’s ‘Will to Power’ ... or writing notes for my essay on Giotto.”

His family fled Warsaw for Italy in 1939 and settled a year later in Elmira, N.Y. His experiences in Nazi-held Europe helped steer him toward the study of history, in which, he later wrote, he could “spread a moral message by showing, using examples from history, how evil ideas lead to evil consequences.”

In 1940, he received a scholarship to what is now Muskingum University in Ohio, where one of his fellow students was future astronaut and U.S. senator John Glenn.

After serving in the Army Air Forces during World War II, Dr. Pipes graduated in 1945 from Cornell University. He received a doctorate in history from Harvard in 1950. He retired from teaching at Harvard in 1996 but maintained an office for many years afterward.

His first book, “Formation of the Soviet Union,” was published in 1954. He wrote or edited more than 20 books, including the 944-page “The Russian Revolution” (1990). His later books included “Property and Freedom” (1999), a defense of property rights as an essential element of democracy, and “Communism: A History” (2001).

“Communism,” he wrote, “ultimately was defeated by its inability to refashion human nature.”

Survivors include his wife of 71 years, Irene Roth Pipes of Cambridge, Mass.; two sons, Daniel Pipes of Philadelphia and Steven Pipes of Manhattan; and four grandchildren.

In his study of Russian history, Dr. Pipes recognized a pattern of autocratic leaders that extended from at least the 18th century through the Communist era and beyond.

“They’re now at a crossroads,” he said in 1999, one year before Vladi­mir Putin was first elected president. “I don’t think there’s the slightest chance Communism will come back . . . but it’s entirely possible that they’ll go to some kind of authoritarian regime — and that would be consistent with their traditions.”