Heresy, by S.J. Parris.
The Italian Inquisition is after Dr. Bruno, a monk, for reading a banned book but he escapes to France. When there, he gains the favor of the French Court and the king sends him to England, where most of the story takes place. Bruno gets drafted as a spy into the service of the English court. His personal quest to find a book thought to be lost leads him to Oxford, where the English court wants him to discover hidden papists. It's in Oxford that Dr. Bruno takes on a third title, detective, to solve a few murders.
Just when you think you've got the plot figured out, a wrench is thrown into your imagined plan and you have to keep turning the pages to create a new plan.