Master; sir: a title used in the Middle Ages, given to a person in authority, or to one having a licence from a university to teach philosophy and the liberal arts.
How often have the words justice of peace and magister occurred in a corpus of books? (source: Google Ngram Viewer )