The action seeks a judgment establishing and foreclosing a lien on real property. The realty is located wholly in Nassau county. Although the statute (Civ. Prac. Act, § 183, subd. 9) states that such an action must be tried in the county in which the subject of the action or some part thereof is situated, nevertheless, it also provides (Civ. Prac. Act, § 186; Rules Civ. Prac. rule 146) that, although the county designated in the complaint as the place of trial is not the proper county, the action may be tried therein unless the place of trial is changed to the proper county upon timely demand of the defendant followed by the consent of plaintiff, or by order of the court.
Here, several weeks after service of its amended answer, appellant, pursuant to the provisions of section 187, subdivision 1, of the Civil Practice Act, moved for a change of venue upon the ground that the county designated for the place of trial in the complaint wras not the proper county. It had failed to comply with the conditions set forth in rule 146 of the Rules of Civil Practice, in that it had not served “ on the plaintiff’s attorney with the answer or before the service of the answer, a written demand ” specifying the county where defendant required the action to be tried. Had this been done and had plaintiff’s attorney then failed to serve a written consent to the proposed change within five days, a motion made within ten days thereafter for change of venue to the proper county would have been granted as a matter of right. (Acker v. Leland, 96 N. Y. 383; Finch School v. Finch, 144 App. Div. 687.) Omission of defendant to make the demand within the time specified by the Rules of Civil Practice thus deprived defendant of obtaining a change of venue as a matter of right (Hoffman v. Hoffman, 153 App. Div. *541191; Larkin v. Watson Wagon Co., 68 id. 86, 87), but it did not preclude defendant from applying for a change in the court’s discretion. (Goldfeder v. Greenberg, 189 App. Div. 184; State Board of Pharmacy v. Rhinehardt, 116 id. 495, 498.)
In the interest of orderly procedure and for the sake of facility and certainty in title records, this action should be tried in the county within which the realty is located. A foreclosure action entails a judicial sale which, regardless of the place of trial, must be held in the county where the real property is situated. (Civ. Prac. Act, § 506.) In two recent decisions (Manufacturers Trust Co. v. Roerich Museum, 236 App. Div. 76; Railroad Federal Savings & Loan Assn. v. Zelkind, 247 id. 110), wherein the venue of actions affecting real estate was laid in a county other than the one in which the real property was located, this court clearly indicated that such actions should not be brought in a county other than the proper county. Where a litigant bringing an action affecting a title to land or an interest in real estate fails to comply with the statutory requirement (Civ. Prac. Act, § 183), any defendant may at any time before trial apply for a change of venue, and such application, although made too late for relief as a right, may be granted in the exercise of the court’s discretion when no prejudice has been caused by the delay. Moreover, we believe that in cases of this class the court has inherent power to order the change. (State Board of Pharmacy v. Rhinehardt, supra; Beach 54th St, Inc., v. Rubinstein, 246 App. Div. 505.)
Respondent, however, calls attention to the fact that appellant failed to serve notice of this motion on the codefendants. Appellant sets forth that these other defendants have no interest in the premises; that they have been apprised “ of the condition of the record,” and that the application for a change of venue “ would not have been opposed ” by them. Nevertheless, as to the codefendants who have appeared in the action the objection appears to have merit. (Sherman v. Adirondack R. Co., 92 Hun, 39; Lyman v. Gramercy Club, 28 App. Div. 30, 34.)
In the circumstances, we think the court properly denied so much of the appellant’s motion as sought a severance of the action as to it; and that without the consent of the appearing defendants who were not served with notice of the motion or without waiver of such notice, it should not have ordered a change of venue.
The order should, therefore, be affirmed, with twenty dollars costs to the respondent, with leave to renew so much of the application as seeks a change of venue unless appellant procures from the defendants who have appeared and files within ten days either a waiver of notice of the motion or a consent to the change of venue; *542in which event the order should.be modified by granting such change of venue and as so modified affirmed, without costs.
Martin, P. J., McAvoy, Untermyer and Dore, JJ., concur.
Order unanimously affirmed, with twenty dollars costs and disbursements to the respondent, with leave to renew so much of the application as seeks a change of venue unless appellant procures from the defendants who have appeared and files within ten days either a waiver of notice of the motion or a consent to the change of venue; in which event the order is modified by granting such change of venue and as so modified afiirmed, without costs. Settle order on notice.