The writ of Quo Warranto (meaning "by what authority") is issued by a court to inquire into the legality of the claim of a person to a public office. It is used to prevent illegal usurpation of a public office by a person. If the court finds that the person is not legally entitled to the office, it can issue an order to remove them from office.