Green’s Dictionary of Slang

blue devil n.1

also devil in blue
[the blue uniform]
[mid-19C]

(Aus./UK/US Und.) a policeman.