Single-word synonym for a “pedantic rule-follower”?

What do you call a person who always follows the rules, at the expense of everything else? I’m thinking there’s one word that can describe this, but I can’t place it.


A jobsworth is “someone who always obeys the rules of their job exactly, even when it would be more sensible not to”.


You could say the person is a stickler (sometimes clarified with for: “a stickler for the rules”, “a stickler for accuracy”, “a stickler for grammar”) if you mean they enforce rules or process that others don't.