His death was confirmed by Aleksei Parshin, director of the department of algebra at the Steklov Mathematical Institute in Moscow, where Professor Shafarevich had led a seminar for many years, until 2008.
In recent decades his image was tarnished in academic circles by accusations of anti-Semitism and a far-right tilt toward Russian nationalism.
Professor Shafarevich's work is known throughout the mathematical world, his name enshrined in the Shafarevich-Weil and Golod-Shafarevich theorems. His textbooks on algebraic geometry, translated into English, are regarded as classics in the field. As a young professor, he had been known to cut a handsome, charismatic figure in the classrooms and lecture halls.
He told one Russian interviewer that when he was unexpectedly allowed by the Soviet authorities to attend an international mathematics conference in Edinburgh, it felt "like reuniting with long-lost family whose work I know in detail and who know my work in detail."
He came to wider international attention in 1973 as one of the few dissident voices in Soviet science to rise to the defense Andrei D. Sakharov, the physicist who took on the Soviet regime and later received the Nobel Peace Prize.
When the authorities pressured scientists to sign a letter denouncing Sakharov, Professor Shafarevich wrote an open letter of support that was conveyed to Western journalists in Moscow.
"One cannot help remembering the nineteen-thirties and forties when we condemned with wrath and held up to shame without having the vaguest idea of what we were condemning," Professor Shafarevich wrote in the letter, referring to those who were denounced as enemies of the state under the Soviet dictator Joseph Stalin.
Professor Shafarevich was a member of the Committee on Human Rights, which was co-founded by Sakharov and whose membership included the author Aleksandr Solzhenitsyn.
Professor Shafarevich contributed essays to "From Under the Rubble," a collection of writings, initiated by Solzhenitsyn, that dissected Soviet rule and called for a Christian alternative. The book was published in the West and circulated in samizdat form in the Soviet Union.
Professor Shafarevich had defended scientific honesty earlier in his career when he signed a letter in 1955, along with 300 scientists, denouncing the misleading theories of the Soviet agricultural biologist Trofim Lysenko, who had gained broad power under Stalin.
In 1975, Professor Shafarevich's open dissidence cost him his teaching job at Moscow State University, where he had taught for more than 30 years. His firing prompted leading mathematicians from around the world to rally to his defense. Some, including Michael Atiyah, Serge Lang and David Mumford, signed a letter of protest that was printed in The New York Times.
Igor Rostislavovich Shafarevich was born in Zhitomir, Ukraine, on June 3, 1923.
He graduated from Moscow State University, having studied with the Faculty of Mechanics and Mathematics there. His father, also a graduate of the university, taught engineering mechanics.
Igor Shafarevich's political writings were at first in sync with the anti-Soviet sentiments of the intelligentsia. His book "The Socialist Phenomenon"traced the history of socialism to the Sumerian, Egyptian and other ancient empires and described it as deadly in all its forms, not least Bolshevism.
His writings, however, became progressively more xenophobic. And to his critics, one essay, "Russophobia," from 1982, stamped him as an anti-Semite. In the essay, influenced by the French historian Augustin Cochin and his studies of the French Revolution, Professor Shafarevich elaborated on a theory of the "small nation" that destroys the "large nation" that hosts it, singling out Jews.
Professor Shafarevich called the anti-Semitism accusations "absurd and scandalous." But he emerged as a hero to nationalist groups, and as his ideas were disseminated, there were reports that Jews were being blocked from positions at the Steklov Institute, where he taught.
In 1992, in the United States, the National Academy of Sciences asked for his resignation as a foreign associate. Professor Lang, who had signed the letter to The Times in his defense in the 1970s, denounced Professor Shafarevich's ideas but defended his right to remain in the academy.
Professor Shafarevich later argued for the return of the Crimean peninsula to Moscow, saying that it had been "torn from the body of Russia" by Ukraine and that its port city of Sevastopol was "a key to the resurgence of Russia." His assertions foreshadowed President Vladimir V. Putin's annexation of Crimea in 2014.
More recently, Professor Shafarevich has been cited approvingly on far-right websites like Breitbart News.
He is survived by his wife, Nina, as well as a son, a daughter, four grandchildren and two great-grandchildren.
How Professor Shafarevich should be remembered has been debated on social media since his death.
"He should be credited for his work as a dissident in the early 1970s," Mikhail Epstein, a professor of Russian cultural history at Emory University in Atlanta, said in an email. But, he added, Professor Shafarevich's "subsequent turn to propaganda of anti-Semitism, of course, undermines his authority as an intellectual, as a freethinker."
Professor Shafarevich's former students, some of them Jewish, were divided over his legacy. "It is a difficult matter for me," said one, Yuri Manin, a retired scientific member at the Max Planck Institute for Mathematics in Bonn and a professor emeritus at Northwestern University.
Another former student, Igor Dolgachev, a professor emeritus at the University of Michigan, said that while he objected to Professor Shafarevich's social and political views, he rejected the accusation of anti-Semitism, citing the help the professor gave Jewish students in getting jobs and getting published.
MARCH 13, 2017 © NY Times