
1 Cal.2d 718 (1934)
STANDARD BRANDS OF CALIFORNIA, Appellant,
v.
HUGH H. BRYCE et al., Respondents.
S. F. No. 14894. 
Supreme Court of California. In Bank.  
October 31, 1934.
 Livingston & Livingston for Appellant.
 Milton Marks, Victor P. Showers and Walter S. Barrett for Respondents.
 SHENK, J.
 The plaintiff commenced an action in the Superior Court in and for the City and County of San Francisco by filing a complaint praying for certain declaratory and injunctive relief, to which the defendants Bryce filed an answer and a cross-complaint. The defendants Barrett and Hilp also filed an answer. The defendants Bryce moved for a change of place of trial to the county of Los Angeles. The motion was granted, and from the order the plaintiff appeals.
 The allegations of the complaint show that the plaintiff owns certain real property in the city of Los Angeles. The defendants Bryce own adjoining property. Under a contract with the plaintiff the defendants Barrett and Hilp, copartners, erected a building on the plaintiff's property. In the course of construction thereof certain excavating was done under the cottages on the defendant Bryces' lot, and a concrete ledge or shelf built which connected the cottages with the wall of the plaintiff's building. The plaintiff alleges that the defendants Bryce have notified it that their land and cottages have been injured by reason of that and other claimed encroachments and the excavations on the Bryces' land, and other matters not necessary to mention specifically, and that said defendants intend to and will assert claims for damages against the plaintiff and commence an action against it for the sum of $7,500. It is further alleged that if there are any encroachments upon or injuries to said defendants' property, the liability is not that of the plaintiff but of the defendants, Barrett and Hilp. The plaintiff seeks a declaration of its rights and duties with respect to the defendants Bryce and the defendants Barrett and Hilp, and in respect to the property of the defendants *720 Bryce, and for a declaration that the liability for said claimed injuries, if any, is the liability of the defendants Barrett and Hilp and not of the plaintiff. It also asks for an injunction to restrain the defendants from commencing any action against it on account of the asserted claim of the defendants Bryce.
 [1] The ground of the appeal is that the motion for change of place of trial should have been denied because the action is not governed by section 392 (1) of the Code of Civil Procedure, and that the complaint shows that a cause for declaratory relief is alleged also against the defendants Barrett and Hilp, and that they were not joined as defendants solely for the purpose of having the action tried in the city and county of San Francisco, the place of their residence. (Sec. 395, Code Civ. Proc.)
 Aside from other considerations, the court, on making the order for change of place of trial, properly concluded that the action was one "for injuries to real property". The plaintiff argues that because it is not in the position of a party asking for damages for injuries to real property, and that all it desires is a declaration of absence of any liability on its part on account of the acts which are claimed to have caused the injuries to the real property of the defendants Bryce, the action is not one "for injuries to real property". Section 392 of the Code of Civil Procedure provides that "actions for the following causes must be tried in the county in which the subject of the action, or some part thereof, is situated ... (1) for the recovery of real property, or of an estate or interest therein ... and for injuries to real property". [2] Whether the place of trial is governed by this section is to be determined by the subject matter of the action as shown by the complaint. (Weygandt v. Larson, 130 Cal.App. 304 [19 PaCal.2d 852]; Donohoe v. Rogers, 168 Cal. 700, 701 [144 P. 958]; 25 Cal.Jur. 855, 857, 907, 908.) The principal question for determination under the facts disclosed by the complaint and the issues tendered by the allegations thereof is the liability of the respective parties for injuries to real property. The alleged injuries to the real property, therefore, must be deemed to be the subject matter of the action, whether the action be brought by the person claimed to have caused the injuries, as in the present case, for the *721 purpose of resisting the owners' asserted claim, or whether the owners bring the action on their claim in the first instance and the other party resists by defending it. This is so also for the reason that, although the plaintiff in form has attempted to allege a cause for declaratory relief, nevertheless the facts alleged by it reveal that it is not entitled to any such relief, because it has not in fact alleged any such cause. The injury to the real property having occurred, it may be said that the only cause alleged by the complaint is the cause of action which the defendants Bryce are alleged to claim against the plaintiff. The subject matter of that cause of action is the tort, viz., the injury to the real property of the Bryces located in Los Angeles County. The only distinction between the action as stated by the plaintiff and the action as it would have been stated had the defendant sued, is, as noted, that the person claimed to have caused the injury, instead of the owners of the property claimed to have been injured, is suing as the plaintiff. The action is not, therefore, declaratory in character, but in fact presents essentially the same issues which would be involved upon a determination of the cause of action which the complaint shows has already accrued, viz., the liability of the respective parties by reason of the acts and conduct claimed to have caused the injuries. [3] The subject matter of an action and the issues involved are determinable from the facts pleaded, rather than from the title or prayer for relief. (Luckey v. Superior Court, 209 Cal. 360, 366 [287 P. 450], citing 1 Freeman on Judgments, sec. 366.) When, as here, the cause of action has already accrued and the only question for determination is the ultimate liability of one party on account of consequential relief to which another is shown to be entitled, it has been held that the nature of the action is not a cause for declaratory relief but is defined by the subject matter of the accrued cause of action. (See In re Sterrett's Estate, 300 Pa. 116 [150 Atl. 159, 162]; Kaaa v. Waiakea Mill Co., 29 Hawaii, 122, 127, 128; see, also, notes in 12 A.L.R. 74-76; 50 A.L.R. 43, 44; 68 A.L.R. 119.) These considerations are applicable as well on the questions of the nature of the action and the subject matter of the complaint in determining the defendant Bryces' motion for a change of place of trial. Consequently the plaintiff, by *722 bringing the action itself in anticipation of the defendant Bryces' claim against it, and by joining other defendants upon whom it attempts to fasten the claimed liability and who reside in a county outside the county where the real property is situated, may not deprive the owners of the property of their right to a trial in the county where the real property is located. The plaintiff may not, by this device, choose its own forum and thus evade the statutory provisions which require a trial in Los Angeles County of any cause of action shown by the complaint to have accrued.
 The order is affirmed.
 Preston, J., Curtis, J., Seawell, J., and Waste, C.J., concurred.
