Russian President Dmitry Medvedev braved the closure of Europe’s air space caused by a volcanic ash cloud to attend the funeral in Krakow - a gesture of solidarity that reinforced Polish hopes for improved ties with their communist-era master.

After a solemn mass, two gun carriages bore the coffins of Kaczynski and his wife Maria, draped in the red-and-white national flag, through winding streets to their final resting place in Wawel cathedral.

Tens of thousands of Poles chanted “Lech Kaczynski, we thank you” and waved flags and banners of the 1980s anti-communist Solidarity movement which the combative nationalist once helped to build.

Kaczynski, his wife and 94 other, mostly senior Polish political and military officials died when their plane crashed in thick fog near Smolensk in western Russia on April 10.

They had been heading to the Katyn forest to mark the 70th anniversary of the massacre of 22,000 Polish officers and intellectuals by Soviet secret police. For decades until 1990, Moscow denied responsibility for the deaths, blaming the Nazis.

Speaking to Polish television shortly before boarding his plane back to Moscow, Medvedev said: “In views of these heavy losses I believe we can make serious efforts to draw our nations closer together, to develop economic relations and find solutions to the most difficult problems, including Katyn.”

Poland and Russia are at loggerheads over various issues, including missile defense, NATO enlargement and gas pipelines.

Medvedev assured Komorowski in their private talks in Krakow that Russia would cooperate fully with Poland over the crash. Russian investigators have said they believe pilot error caused the disaster.

Other mourners included the presidents of Germany, Ukraine, the Czech Republic, Hungary, Slovakia, Romania and Georgia.

US President Barack Obama, German Chancellor Angela Merkel and French President Nicolas Sarkozy were among those forced by the ash cloud to abandon plans to attend Kaczynski’s funeral.