MOSCOW — Former Russian Prime Minister Yevgeny Primakov, whose career included desperate but unsuccessful diplomatic efforts to avert wars in Iraq and NATO’s bombing of Yugoslavia, has died. He was 85.

President Vladimir Putin on Friday offered condolences to Primakov’s family, Putin’s spokesman Dmitry Peskov said. He added that the president saw Primakov as “a statesman, an academic and a politician who has left a very big heritage” and that he always wanted to hear Primakov’s view on global issues.

The cause of death wasn’t immediately known.

With his slow, rumbling speaking manner, hooded eyes and a face whose default expression was a sly smile, Primakov, a seasoned political scholar and Middle East expert, looked like the embodiment of an insider operative for a country full of opaque intrigues.

Primakov began his career on a classic Soviet path. Trained as an Orientalist, he worked as a journalist for a decade-and-a-half in the Middle East for Soviet radio and the Communist Party newspaper Pravda, positions widely seen to be covers for espionage work.

He later moved through an assortment of senior academic positions and joined the political scene in 1989, when he became chairman of one of the chambers of the Soviet parliament, helping spearhead Soviet leader Mikhail Gorbachev’s political reforms.

Gorbachev in a statement praised Primakov for “defending the country’s interests with both resolve and flexibility.”

In 1991, Primakov was named head of Russia’s foreign intelligence service and held the job for five years before becoming foreign minister.

As Russia’s top diplomat, he was regarded as a firm but pragmatic supporter of Russian interests as the country agonized over its loss of superpower status. He worked hard to dilute the United States’ perceived unilateral dominance of world affairs.

After being appointed prime minister in 1998 following Russia’s bruising financial crisis, Primakov tried to prevent the NATO air war against Yugoslavia over the Kosovo crisis.

He was heading on a flight to the United States on official visit in March 1999 when he learned that Washington decided to launch the air raids, and ordered his pilots to turn the plane back while it was already halfway over the Atlantic, a bold move that helped bolster his popularity at home.