LONDON — A British judge has dismissed torture charges against the ex-wife of a former Liberian president before her trial next month over accusations relating to the country’s civil war.

Agnes Reeves Taylor, the ex-wife of former President Charles Taylor, was arrested in London in 2017 and charged with eight counts of torture and conspiracy to commit torture as part of her husband’s National Patriotic Front of Liberia, which in the 1990s participated in one of Africa’s bloodiest recent civil wars.

But a judge at the Old Bailey in London, the central criminal court for England and Wales, ruled on Friday that there was not enough evidence to prove that the group had governmental control in the areas where the atrocities were said to have taken place — a requirement for the case to be tried in Britain.

The case had been viewed as an important test for those seeking to see torture in other countries punished in British courts. The country’s Supreme Court decided in a landmark ruling last month that members of nonstate groups that exercised “the functions of government” during armed conflicts could be prosecuted in Britain.