BAGHOUZ, Syria -- Besieged in their last foothold in eastern Syria, Islamic State militants issued a defiant message calling on supporters around the world to carry out attacks in their defence. The once mighty group tried to enshrine an image for the future after defeat, depicting its crumbling domain as the one place ruled by "God's law" and promising it would one day be victorious.

The messaging came in an audio recording and video released online by militants said to be inside the village of Baghouz, where they have been besieged for weeks and, in the past few days, under stepped up assault and bombardment by the U.S.-backed Syrian Democratic Forces.

At sunset Tuesday, mortar blasts and clashes resumed after a daytime lull. Flares lit the sky as the sound of heavy guns echoed off a nearby hilltop. An Associated Press team saw convoys of trucks of SDF fighters moving on roads leading to Baghouz, apparently heading to the front lines.

One commander, who identified himself as Abu Ali, said the forces were "looking for the weak link" in ISIS defences to advance.

The ISIS messages may sound like desperate spin on a humiliating end to its self-declared "caliphate." But the rhetoric could have powerful resonance with the group's die-hard supporters. Some of the thousands of civilians evacuated from Baghouz in recent weeks said they still held to ISIS's dream.

Ever since it conquered its "caliphate" stretching across much of Syria and Iraq in 2014, the Islamic State group claimed to be carrying out a real-world experiment in implementing Islamic Sharia law. That was a draw for hardliners who saw a utopian land ruled by God's word. What the group carried out was its own radically extreme interpretation of Sharia that was widely denounced by most Muslims.

It became notorious for its atrocities, including massacres of opponents, enslavement and rape of Yazidi women and beheadings and vicious killings of those who violated its rules. For its supporters, the brutality was confirmation that the group would not compromise in its vision.

The ISIS domain has now been reduced to a tiny patch of land hardly a mile (1.6 kilometres) across. Several hundred fighters are believed to remain inside along with an unknown number of civilians, running out of food and ammunition among blasted houses and burned tents, cornered between the Euphrates River and a desert cliff near the Iraqi border.

In the recently released video, ISIS militants sought to reshape their message for the future, insisting the group stayed true to a vision that will outlast them. Scenes in the video show what appear to be streets in Baghouz as a truck of ISIS's religious police circulates, calling through a loudspeaker to people around to remain pious and seek God's forgiveness. It is not clear when the video was recorded, and its contents could not be independently confirmed.

At one point a militant identified only as Abu Abdul-Azim talks the camera as he and his comrades eat soup -- likely intended to show that the fighters still have food. A young boy sits next to him.

By the "standards of this world," ISIS may seem to have been defeated, Abu Abdul-Azim says. "If we used to hold thousands of kilometres and now only a few kilometres remain, it is said that we lost. That is by the standards of this world. But the standards of the Other World and Almighty God are different," he says.

"What is our crime? Why are we bombarded by war planes? Why has the entire world of infidels come together to fight us? ...It is because we wanted to implement God's Law," he says with a smile. "There is no group in the world that ruled by the Qur'an and Sunna except this select group. That is victory. .. So we are patient. Victory and endurance means sticking to what God Almighty loves."

In a separate audio recording, a minute and a half long, an unidentified ISIS militant calls on Muslim "brothers, in Europe and in the whole world" to "rise against the Crusaders and ... take revenge for your religion." As the man speaks, cracks of gunfire can be heard in the background, apparently meant to suggest that he is in Baghouz. He said men, women and children in Baghouz are being subjected to a "holocaust by the Crusaders," which is militant jargon for the U.S.-led coalition against ISIS.

The audio was released by ISIS supporters on social media and reported by the SITE Intelligence Group late Monday.

Some 10,000 civilians were evacuated from the ISIS-held pocket the past few weeks, most of them family members of ISIS fighters. Even after fleeing fighting for months as ISIS territory crumbled, even after seeing children and loved ones killed and enduring exhaustion and hunger, some of them remain die-hard supporters, proclaiming that they still believed in ISIS's vision of Sharia rule.

Bali said Tuesday that some ISIS fighters and their families emerged from the besieged area without saying how many -- the first batch of people to leave Baghouz since the SDF began an offensive over the weekend.

Another official, who goes by the name Adnan Afrin, said a large number of fighters were among the evacuees. Adnan Afrin said one front of the battle zone was left quiet to allow those surrendering but that clashes continued elsewhere.

Britain-based Syrian Observatory for Human Rights, which monitors Syria's war, said some 350 people left the ISIS-held area Tuesday, including 120 ISIS fighters. The group said those who left included citizens of Lebanon and Morocco.

On the ground, commanders say they have been hindered by ISIS sniper fire but are relying more on airstrikes and heavy weaponry, rather than ground forces, to push ISIS to surrender.

An SDF commander who identified himself by his nom de guerre Argish al-Deiri told The Associated Press on Tuesday that his men advanced overnight and secured some positions on the edge of a tent settlement where ISIS militants are making their last stand.

"We entered the camp, then stopped," he said. "There was resistance, and we withdrew. The planes struck the ammunition depot," setting off explosions that halted the push.

Al-Deiri said ISIS militants were fighting back with heavy weapons, rifles and sniper fire, forcing SDF fighters to slow their advance rather than advancing quickly so that "you don't lose your men."

He said he hoped the ISIS fighters will surrender in the coming "few days."

Youssef reported from Cairo. Associated Press writer Bassem Mroue in Beirut contributed to this report.