The writ described in section 5525 may be issued by the Supreme Judicial Court or Superior Court sitting in any county in which the person in whose behalf application is made is restrained or by any justice thereof, the form to be varied so far as necessary when issued by a justice of the court, and may be served in any county in the State.
14 M.R.S. § 5526