In his first purported speech in nearly a year, the leader of ISIS has called on followers to fight on despite recent defeats, according to an audio recording posted on the militant group's media outlet.

In the 55-minute statement, Abu Bakr al-Baghdadi congratulated the "striking lions" behind recent attacks in Canada and Europe, and called on followers to use bombs, knives or cars to carry out attacks.

Baghdadi also offered greetings to Muslims for Eid al-Adha, a feast celebrated this week, suggesting the message was recorded recently.

"For the Mujahideen [holy warriors], the scale of victory or defeat is not dependant on a city or town being stolen or subject to that who has aerial superiority, intercontinental missiles or smart bombs," Baghdadi said in a recording in Arabic posted by his al-Furqan media group.

"Oh Caliphate soldiers.... trust in God's promise and His victory... for with hardship comes relief and a way out," he added, addressing followers in various cities in Syria.

Reuters was unable to verify whether the voice on the recording was Baghdadi's.

Series of defeats

The Islamic State in Iraq and Syria, which until last year controlled large areas in Syria and Iraq, has since been driven into the desert by successive defeats in offensives by international allies in both countries.

Baghdadi, who declared himself ruler of all Muslims in 2014 after capturing Iraq's main northern city Mosul, is now believed to be hiding in the Iraqi-Syrian border region after losing all the cities and towns of his self-proclaimed caliphate.

ISIS has claimed responsibility for attacks around the world, including a July 22 shooting in Toronto that left two people dead and 13 wounded. Canadian police said they had no evidence so far to support the claim.

People write messages on construction boarding after a mass shooting on Danforth Avenue in Toronto on July 24. The purported audio message by the ISIS leader cites attacks in Canada and Europe. (Chris Helgren/Reuters)

Baghdadi also called on Iraqi followers to keep up attacks against Shia Muslims and what he described as apostates — a reference to Sunni Muslims fighting against his group.

He called on followers to remain loyal to the leaders of his movement and urged the citizens of Saudi Arabia, Bahrain and Jordan to overthrow their rulers.

The secretive ISIS leader has frequently been reported killed or wounded since leading his fighters on a sweep through northern Iraq. His whereabouts are not known but Wednesday's message suggests he is still alive.

Fighters with the Syrian Democratic Forces inspect weapons recovered from ISIS militants in Raqqa, Syria, in October 2017. ISIS has suffered a string of recent defeats in Iraq and most of Syria. (Erik De Castro/Reuters)

One of his sons was reported to have been killed in the city of Homs in Syria, the group's news channel reported earlier this year.

Baghdadi also warned that Idlib province in Syria was about to fall as Russia and Syrian government forces were preparing to invade it. Idlib province is in the last swathe of territory still held by rebels opposed to the rule of President Bashar al-Assad.

In June, the UN regional humanitarian co-ordinator warned that ISIS and other militant groups were mingled with the population in Idlib, making it a "highly explosive" situation.