On a sandy street in a northern Malian town, armed guards take turns at a checkpoint next to two unmarked pickup trucks as dusk falls and the sky slowly fills with stars.
The men are not army troops but fighters from the Coordination of Azawad Movements (CMA) -- a predominantly Tuareg alliance that fought the state for years before signing a peace deal in 2015.
It has since taken charge of the strategic town of Kidal.
It is this group, rather than the government, that maintains security there, runs the prisons and issues pardons, an AFP correspondent found during a rare visit.
The fact that Kidal is still controlled by the ex-rebels continues to pose a sovereignty issue and remains a source of irritation for Bamako -- including for the current junta.
"In Kidal, armed groups play a more important role" in administration than the state, a panel of UN experts said in August.
A former French military post dating back to the early 20th century, Kidal is a mosaic of right-angled streets and flat buildings set in the desert dust.
It lies more than 1,500 kilometres (930 miles) from the capital Bamako and hundreds of kilometres from the cities of Gao and Timbuktu.
It is a crucial stopover between Mali and Algeria.
When an insurrection broke out in 2012, the region was one of the first in Mali to fall into the hands of the rebels, both separatists and Salafists.
It was taken over by the CMA in 2013 following military intervention by France, and has remained in their hands despite a 2014 attempt by the Malian army to regain control.
In 2015, the rebels signed the so-called Algiers peace agreement with pro-government armed groups and the state.
Instead of independence, it offered them more local autonomy and the chance to integrate their fighters into a state-run "reconstituted" army that would operate throughout the north and maintain security in Kidal.
But the agreement has only been implemented in fragments.
About 600 "reintegrated" soldiers were redeployed to Kidal in 2020, but they hardly ever leave their camps, according to the UN.
Today, there is a state governor in Kidal but no national police force or justice system.
Law and justice
Ibrahim Ag Moustapha, the commander of the detachment deployed at the crossroads, said his men were there to spot "drunken behaviour," vehicles "without lights" and those "holding military equipment".
The ex-rebels decide whether suspects will be brought to justice -- under Islamic, rather than state, law.
On a recent visit to an Islamic court, judges known as cadis were ruling on a land dispute, with the Koran placed on a low table around which the judges and the defendants sat on mats.
Nearly 130 cases had been heard there over the previous two months, Moulaye Ag Sidi Lola, a member of the council of judges, told AFP.
He said the judgments handed down by the cadis are "independent" of the CMA.
"In the Tuareg environment, people have always had recourse to the cadi," Ag Moustapha, the commander, said.
"Even in colonial times, there was the cadi; the system has never changed."
Convicts are detained in a prison secured by the CMA, with 36 people being held there as of early September.
Some may be pardoned -- again by the ex-rebels -- usually before Eid-al-Adha or Ramadan, Sidi Lola said.
The CMA "did not inherit the previous means of state," said lghabass Ag Intalla, the group's president and a central figure of the former rebellion. "We resorted to our own means".
In the meantime, regular citizens, who come from the same communities as the CMA, appear committed to the armed group's cause.
The colours of the former rebellion are painted on walls lining the streets of Kidal. A skeletal army tank -- a souvenir of old battles -- serves as a roundabout.
If there are discordant opinions, they are not expressed publicly.
"The patrols are very effective," said Hartata Ag Baye, a pharmacist downtown who says he is happy to be able to stay open late, something that would be impossible in many parts of northern Mali.
The situation is "calm" in Kidal, said Attiyoub Ag Intalla, the head of a civil society group, but it remains "uncertain".
Further south, the areas of Gao and Menaka have for months been plagued by fighting between the army, armed groups and jihadists, with civilians caught in the crossfire.
The violence could "come here", the civil society leader worried. Displaced people are already pouring in, he said.