In the long-drawn-out struggle for Ukraine, it may be surprising to know that Chechen fighters in their hundreds have joined the battle.

It’s even more surprising to learn that they have been fighting on both sides.

The legacy of the two wars with Russia in the 1990s means there is no shortage of people from the Caucasus republic eager to take up arms against the enemy again.

But Chechen forces loyal to strongman leader Ramzan Kadyrov are also fighting alongside pro-Russian forces in eastern Ukraine.

“I can’t be angry with Russia for my whole life,” said Apti Bolotkhanov, 36, the commander of the “Death Battalion”, which is mainly made up of Chechens. “There were Russians who helped us also [during the Chechen wars]. It was like Donetsk now – there was just a chaotic bunch of people and groups, fighting.”

He told the Guardian in an interview in Grozny that at the peak of the fighting earlier this year there were around 300 Chechens fighting in Donetsk on the side of the rebels.

Bolotkhanov said the fighters were volunteers and that they coordinated their actions with the Donetsk rebel leadership. The Chechens took part in the long and bloody battle for Donetsk airport, spending five months in and around Donetsk before returning to Chechnya. He said they are prepared to return to Donetsk “whenever required”.

Chechens fighting on the side of the pro-Russian rebels, taken in Donetsk. Apti Bolotkhanov is in the back row, third from left. Photograph: Provided to the Guardian

There are also around 100 Chechens fighting on the side of Ukraine, in two volunteer battalions, one named after the 1990s independence leader Dzhokhar Dudayev, and one named after Sheikh Mansur, an 18th-century Chechen leader who fought the Russians.

The eventual solution to Russia’s Chechnya problem – placing Kadyrov in charge, showering him with cash to renovate the republic, and letting him rule with impunity – is seen by the Kremlin as a success and even as a blueprint for a potential solution for east Ukraine.

Russia’s foreign minister, Sergei Lavrov, has told his Ukrainian counterpart, Pavlo Klimkin, several times that Kiev should take Chechnya as a model, Klimkin told the Guardian.

But for now, the legacy of Chechnya is being played out on battlefields, not in statecraft.

While Chechens on both sides have been integrated into the bigger fight, there is also an element of intra-Chechen conflict on the battlefields of east Ukraine. While they were in Donetsk, Bolotkhanov and his men released a video saying they had come to Donetsk to find Isa Munayev, a 1990s Chechen commander who had since lived as a refugee in Denmark and then arrived in Ukraine to found the Dudayev battalion.

Bolotkhanov and his men wanted to liquidate him for using derogatory language about Kadyrov, they said in the video. Munayev was indeed killed during the battle for Debaltseve in February, by a shell during a retreat from a forward position.

When asked if the Chechen battalion was responsible for Munayev’s death, Bolotkhanov smiled, and said: “Allah took him.”

Amina Okuyeva and Adam Osmayev of the Dzhokhar Dudayev battalion, in Kiev. Photograph: Shaun Walker/The Guardian

The new commander of the Dzhokhar Dudayev battalion since Munayev’s death is Adam Osmayev, a British-educated Chechen who spent two years in jail in Odessa, charged with hatching a plot to assassinate Vladimir Putin. He said the charges were trumped up. He was released from prison late last year and said he was on the frontline “within a day or two”. He is hoping that Ukraine’s government will officially allow foreigners to fight in its army in order to entice Chechens away from fighting in Syria.

“People are going from Chechnya to the Middle East out of a sense of hopelessness; if the Ukrainians made the right conditions they would come here instead. Many people go there not from ideology but are brainwashed when they get there,” he said.

Another Chechen man who did not want to be named said he was trying to persuade other Chechens, via online forums, not to travel to the Middle East but to come to Ukraine instead.

“Why are Chechens fighting for Isis, why are they fighting against Kurds who have never done us any wrong? For Kobane, which they had never heard of before? That is not a Chechen war. This, here in Ukraine, is a war for Chechens. If we defeat Russia here, we are closer to freeing our homeland.”

Based on a different section of the frontline, the Sheikh Mansur battalion has a more overtly Islamist bent. Its commander, who would give his name only as “Muslim”, said he spent two decades fighting the Russians in Chechnya, first as part of the popular mobilisation which fought Russia’s troops in two wars for independence, and later as part of the terrorist underground movement which carried out a number of horrific terror attacks such as the Nord-Ost theatre siege, the Beslan school massacre, and a number of suicide bomb attacks on Moscow.

Muslim said he disagreed with the targeting of civilians and had nothing to do with the planning or implementation of such acts, but added that the attacks were “understandable” and “the only way we could get them to listen to us”.

‘Muslim’, commander of the Sheikh Mansur volunteer battalion, fighting with Ukrainian forces outside Mariupol. Photograph: Shaun Walker /The Guardian

“You ask us why we killed peaceful people? Thirty per cent of our whole nation was lost; 300,000 people. We wanted them to feel the same pain that we did when our relatives died.”

Muslim said there are two fighters in his battalion who fought in Syria and left because they felt the methods of the fighters in Syria were “too cruel”. Now they are fighting for Ukraine.

The Chechen battalion shares a base with the Right Sector, a far-right Ukrainian volunteer battalion. One Ukrainian at the base has converted to Islam since the Chechens arrived, and been renamed Shamil.

Although there is an informal system whereby the volunteer battalions coordinate fighting duties, Muslim and the other fighters in the Sheikh Mansur battalion are not officially integrated into the command structure of the Ukrainian army. Indeed, Muslim claimed he has not had a valid passport since the fall of the Soviet Union and is not even in Ukraine legally.

Fighters from the Sheikh Mansur battalion, some with their identity hidden, near the frontline at Shirokyne on 30 June. Photograph: The Sheikh Mansur Battalion Facebook page

He says he left the Chechen mountains in 2007 and came to Ukraine, where he has been in hiding ever since. When he went to meet Munayev last summer to discuss fighting for Ukraine, he crossed the border between Ukraine and Poland illegally, on foot, and then was driven “by our Chechen brothers” to Denmark, he said. He returned the same way, spending two days traversing the Carpathian mountains by foot to avoid border guards.

If you capture one, it’s too risky to bring them back across the lines, so you just give them time to say their prayers

“The conditions in this war are fantastic, there are lots of weapons and lots of food. In the mountains in Chechnya you could go for days without anything, and a lot of people died because the food would be poisoned by the FSB,” he said.

“We like partisan warfare. With tanks you are visible and audible, and on foot you can sneak up quietly,” said Muslim.

These tactics, of low-visibility, close-quarters combat were honed while fighting the Russians.

“We often work deep behind enemy lines. It sometimes involves dressing up in enemy fatigues,” claimed Kazbek, a Ukrainian-speaking Chechen who moved to Ukraine in 1999 when Russia launched its second war in Chechnya, and is fighting with the Dzhokhar Dudayev Battalion. “If you capture one of them, it’s too risky to bring them back across the lines, so you just give them time to say their prayers, and the last words they will hear on this earth are ‘Glory to Ukraine!’”

Apti Bolotkhanov, commander of the ‘Death Battalion’ of Chechens who fought on the side of the pro-Russian rebels. Taken in Grozny, Chechnya, in June. Photograph: Shaun Walker/The Guardian

Bolotkhanov was dismissive of the Chechens fighting on the other side, accusing them of “sitting in cafes in Europe” instead of rebuilding the republic. He, too, has a personal history of fighting the Russians, and of personal tragedies. Two of his cousins were captured, tortured and executed in 2001 by Russian troops, Bolotkhanov said, despite the fact they were “completely peaceful people”.

But when Kadyrov’s father, Akhmad-Khadzhi Kadyrov, first took over the reins of the republic, men like Bolotkhanov who had fought against the Russians were given the chance to be amnestied and join the new battalions loyal to Kadyrov and Russia.

“In 2002 I signed up for the battalions and served until 2012, ending with the rank of major. I performed the hajj six times. If I had stayed with the rebels, or if the war had continued, I would never have had that opportunity. It’s all thanks to Kadyrov.”

He said there is nothing strange about Chechens fighting alongside their long-standing enemy, Russia.

For those on the other side, however, there is no pardoning Moscow for its wars in Chechnya.

“Russia is a mad dog, trying to bite as many people as possible before it dies itself. We need to kill the dog as soon as possible,” said Kazbek, of the Dzhokhar Dudayev battalion.