When a public offense is committed in the presence of a magistrate, the magistrate, by a verbal or written order, may command any person immediately to arrest the offender, and thereupon may proceed as if the offender had been brought before the magistrate on a warrant of arrest.
N.D.C.C. § 29-06-19