Eight months after her arrest, a heavily pregnant detainee was escorted into court in Senegal's capital Dakar for the start of a trial for her involvement in a counterfeit money scheme.
The 42-year-old had spent the bulk of her pregnancy in overcrowded prison cells, sharing mattresses with up to three women and hoping, as her belly swelled, to be freed before the baby was born.
Then a judge offered her a lifeline: to go home and be tracked remotely with an ankle monitor during the trial.
Like most countries in Africa, Senegal's prisons are old, overcrowded and cannot manage the thousands incarcerated for petty crimes, or those in pre-trial lock-up. Many are ineligible for bail because they do not have official addresses.
This year, it launched a pilot scheme to reduce the prison population by releasing hundreds of inmates under electronic supervision, the first country to do so in West Africa, according to the government.
If successful, it could become a blueprint for other countries with clogged jails - Morocco and Togo are already pursuing similar programmes.
Ankle monitors have their critics, however. Detractors say they do not resolve the underlying causes of crammed cells, including harsh punishments for minor crimes and glacial judicial systems. And in authoritarian regimes, rights groups fear they may be overused for surveillance purposes.
Still, for the woman desperate not to give birth in prison, it was a relief.
"Jail is tough," she said, teary-eyed as she recalled the prison's hot and cramped conditions, a thick grey band clasped around her ankle.
She spoke on condition of anonymity because her trial was ongoing.
With the tag, she is allowed to move within an assigned perimeter in her neighbourhood. Any breach would cause it to vibrate and alert a central surveillance centre.
Two people who experienced the ankle monitor told Reuters it was uncomfortable and that they had to charge its battery every few hours. But they agreed it beat prison.
"I told myself it would be good to accept the tag, given my wife was pregnant," said a 31-year-old man who wore an ankle monitor for 11 months before being acquitted and freed last month.
Limitations
Lieutenant Moussa Dieye stands in front of a large screen showing dozens of pins scattered across a map of Senegal, each an inmate freed but under watch.
"With this bracelet, we can let them out and supervise them while they await judgement," said Dieye, who heads the monitoring team from a command centre in Dakar which was launched this year.
It is currently surveilling around 240 people but has the capacity to oversee 1,000.
Dieye said the plan is to expand, but the challenge is enormous. Senegal's prison population exceeds 13,000, the government says. The occupancy level was 130% of capacity in 2018, according to the World Prison Brief (WPB).
Over half of Senegal's prison population were pre-trial detainees in September, WPB data show. A shortage of lawyers and magistrates means some inmates wait years for their case to be heard, right groups and prison officials said.
Senegal isn't alone. Prison capacity is exceeded in 42 of the 47 African countries and territories where data is available, according to WPB.
Sceptics say the tag, which requires charging, excludes people in poorer areas without electricity - around 30% of the population, according to the World Bank.
"There are many (African) countries for which this could be useful ... but it does not solve the lack of personnel, training and budget," said Seydi Gassama, head of Amnesty International in Senegal.