the letter of the law

US /ðə ˌlet.ər əv ðə ˈlɑː/
UK /ðə ˌlet.ər əv ðə ˈlɑː/
"the letter of the law" picture
1.

the literal interpretation of a law or rule, rather than its spirit or intention

:
He followed the letter of the law, but not its spirit, by technically fulfilling the contract without truly helping the client.
Sometimes, applying the letter of the law can lead to unfair outcomes.