Plaintiff, a foreign insurance corporation authorized to do business *640in this State, sues to recover an earned premium on a policy of marine insurance issued in this State to a resident of this State. Defendant obtained an ex parte order requiring plaintiff to furnish security for costs. Plaintiff made application for an order vacating the order requiring security for costs. The motion was granted. Order affirmed, with ten dollars costs and disbursements. Section 1522 of the Civil Practice Act, which provides that a defendant in an action brought in a court of record may require security for costs to be given where the plaintiff, when the action was commenced, was a foreign corporation, does not apply to a foreign insurance corporation which has complied with all the provisions of the statutes authorizing it to do business in this State. One of these statutes requires a foreign insurance corporation to deposit with the Superintendent of Insurance funds for the protection of its policyholders and creditors. Therefore, the defendant is secured as to any costs which may be awarded to him. Such corporations are deemed to be, for most legal purposes and as parties to actions, domestic corporations. (Martine v. International Life Ins. Society of London, 53 N. Y. 339; Morgan v. Mutual Benefit Life Ins. Co., 189 id. 447; Comey v. United Surety Co., 217 id. 268; Matter of People [Norske Lloyd Ins. Co.], 242 id. 148.) Lazansky, P. J., Young, Carswell, Davis and Johnston, JJ., concur.