Hugo Chávez's foreign allies have paid tribute to the Venezuelan president, who died on Tuesday after a long battle with cancer, praising him as a champion of liberation and promising that his influence would live on.

Some even joined Venezuela in announcing mourning periods for the charismatic leader, who divided opinion abroad with his scathing criticism of the US and friendships with countries ostracised by the west.

The Iranian president, Mahmoud Ahmadinejad, said Chávez would "return on resurrection day". He said he had "no doubt that Chávez will return to Earth" along with Jesus and Imam Mahdi, the most revered figure among Shia Muslims, to help "establish peace, justice and kindness" in the world. Announcing a day of mourning, Ahmadinejad also said he believed something "suspicious" caused Chávez's cancer.

In Syria, where civil war has claimed an estimated 70,000 lives over the past two years, there was gratitude for Chávez's unstinting support in the face of western hostility. The state news agency, Sana, praised Chávez's "honourable stance towards the conspiracy against Syria as he announced repeatedly his solidarity with the Syrian leadership and people in the face of the heinous imperialistic campaign hatched against it".

There was also praise from other members of the Latin American left, for whom Chávez was an inspirational leader.

Rafael Correa, president of Ecuador and one of Chávez's closest allies, said: "We have lost a revolutionary, but millions of us remain inspired."

The Bolivian president, Evo Morales, another of the Venezuelan president's most loyal disciples, was teary-eyed and declared: "Chávez is more alive than ever."

"Chávez will continue to be an inspiration for all peoples who fight for their liberation," Morales said in a televised speech.

There was a similar tribute from Nicaragua, a nation that broadly benefited from cut-price Venezuelan oil. Rosario Murillo, the wife and spokeswoman of the president, Daniel Ortega, said Chávez was "one of the dead who never die".

In Cuba, President Raúl Castro's government declared two days of national mourning and ordered the flag to fly at half-mast, declaring its "deep and excruciating sorrow" at the news and describing him as "one of their most outstanding sons". The Argentinian president, Cristina Fernández de Kirchner, declared three days of mourning.

The Chinese foreign ministry spokeswoman Hua Chunying said Chávez was "a great leader", while Russia's UN ambassador ,Vitaly Churkin, called his death a tragedy.

There was a predictably less effusive response from the US, where the president, Barack Obama, issued a statement reaffirming Washington's support for the "Venezuelan people and its interest in developing a constructive relationship with the Venezuelan government", while citing its commitment "to policies that promote democratic principles, the rule of law, and respect for human rights". Many US allies followed his lead. The Canadian prime minister, Stephen Harper, and German foreign minister, Guido Westerwelle, both referred to freedom and democracy as keys to unlocking Venezuela's future potential. The British foreign secretary, William Hague, said he was saddened by Chávez's death but offered a neutral assessment of his leadership, remarking merely that he had "left a lasting impression on the country and more widely".

Another US ally, France, deviated from the script somewhat. The socialist president, François Hollande, noted that "not everyone shared" his political views but praised Chávez's "undeniable will to fight for justice and development".