At the Sign of Triumph (Safehold #9) by David Weber
Synopsis from GoodReads:
The Church of God Awaiting’s triumph over Charis was inevitable. Despite its prosperity, the Charis was a single, small island realm. It boasted less than two percent of the total population of Safehold. How could it possibly resist total destruction? The Church had every reason to be confident of a swift, crushing victory, an object lesson to other rebels.
But Charis had something far more powerful than simple numbers. It had a king, a crown prince, and a navy prepared to die where they stood in its defense. It had the Brethren of Saint Zherneau, who knew the truth about Safehold’s founding. Who knew that the Church of God Awaiting was a monstrous lie. And it had Merlin Athrawes, last survivor of long-vanished Earth. Merlin, the cybernetic avatar of a woman dead over a thousand years, who was determined to break the Church’s grip upon the human mind and soul.
So after eight years of war, it is not Charis but the Church that stands upon the brink of defeat. But the Church still commands immense resources, and — faced with the unthinkable — it’s decided that it, too, must embrace the forbidden technology which has carried Charis so far.
In the end, it is simple, for only one can survive. The lines are drawn, the navies and armies have been raised, and all of Safehold is poised for the final battle between those who believe in freedom and those who would crush it forever.