
62 Cal.Rptr.3d 83 (2007)
152 Cal.App.4th 1143
MILLER-LEIGH LLC, Plaintiff and Appellant,
v.
Shauna HENSON et al., Defendants and Appellants.
Nos. C051652, C052206.
Court of Appeal of California, Third District.
June 28, 2007.
*84 J. Michael Phelps, San Francisco, for Plaintiff and Appellant.
Haycock & Associates, Sacramento, and D. Jack Haycock for Defendants and Appellants.
HULL, J.
This appeal centers on a choice-of-forum clause in a lease guaranty.
Plaintiff Miller-Leigh LLC, leased commercial property located in Arizona to a business, and defendants Shauna Henson and Robert Henson signed a guaranty for the lease. According to plaintiffs complaint, the business abandoned its lease midway through its tenancy and did not pay any further rent. Believing defendants to be residing at "some unknown location in the Sacramento Area," plaintiff brought suit in Sacramento County to recover under the guaranty.
Defendants demurred to the complaint, asserting the court lacked subject matter jurisdiction because a choice-of-forum clause in both the lease and guaranty required plaintiff to bring suit in Arizona. The trial court sustained the demurrer and entered a judgment of dismissal in favor of defendants. Defendants sought to recover attorney fees as the prevailing parties, but the court denied that motion, ruling its lack of subject matter jurisdiction also prevented it from awarding any fees.
Plaintiff appeals, asserting the court erred in concluding it had no jurisdiction over its complaint. Defendants also appeal, *85 asserting the court erred in concluding it had no jurisdiction to award fees. These appeals have been consolidated.
We reverse the underlying judgment and vacate the order on attorney fees. Although the trial court could have elected to enforce the parties' forum selection clause, it erred in concluding that it lacked subject matter jurisdiction over the complaint. Because we reverse this underlying judgment, we also vacate the court's order relating to attorney fees.

FACTS AND PROCEEDINGS
Plaintiff, an Arizona limited liability company, leased medical office space in Scottsdale, Arizona to Lasersoft, another Arizona limited liability company. The lease contained choice of law and forum provision providing, "This lease and its performance shall be governed by the laws of the State of Arizona. The parties agree that any court action relating to this Lease shall be instituted and prosecuted only in a court of competent jurisdiction in Maricopa County, Arizona, and each party waives his rights, if any, to institute or prosecute suit in any other forum than Maricopa County, Arizona."
The lease was accompanied by a guaranty, signed by defendants, guaranteeing the payment of rent over the lease period. This guaranty contained a forum selection clause in paragraph 4, which provided: "Guarantors also agree that the Lease and this Guaranty shall be governed by the laws of the State of Arizona and that the State of Arizona is the proper jurisdiction for litigation of any matters relating to said Lease and Guaranty."
The lease began in November 1998, and ran for a period of five years, through October 2003.
According to plaintiffs complaint, Lasersoft ceased operating, vacated the premises on March 31, 2001, and stopped paying rent. Plaintiff was unable to get a new tenant until mid-December 2002. Plaintiffs efforts to recover the unpaid rent were not successful, in part because defendants had moved to California.
Plaintiff filed a complaint in Sacramento County, alleging causes of action for breach of the guaranty, fraud, account stated, and open book account. Defendants responded by filing a demurrer, asserting the court lacked subject matter jurisdiction over the complaint. (Code of Civil Proc. § 430.10, subd. (a); unspecified statutory references that follow are to the Code of Civil Procedure.) They argued that the lease and guaranty required any action to be brought in Arizona in accordance with the parties' choice of forum provisions.
The trial court sustained the demurrer without leave to amend, specifically citing section 430.10, subdivision (a) as the basis for its decision. The court explained: "The lease agreement that is the subject matter of this action ... provides that `any court action relating to [the] lease shall be instituted and prosecuted only in a court of competent jurisdiction in Maricopa County, Arizona.' [Citation.] The property defendants allegedly leased is located in Scottsdale, Arizona. Further, the guaranty of lease that these named defendants signed ... provides that `the State of Arizona is the proper jurisdiction for litigation of any matters relating to said lease and Guaranty.' [Citation.] As each cause of action is related to the lease, this matter must be heard where the parties agreed."
The court entered a judgment of dismissal in favor of defendants, and plaintiff appeals that decision.
Having prevailed on their demurrer, defendants sought to recover attorney fees, citing fee provisions in the lease agreement and guaranty. Under the lease, attorney *86 fees were to be awarded to the prevailing party in any action to recover "any sum under this Lease, or enforce any right or obligation under this Lease." The guaranty also included an attorney fees provision, requiring defendants "to pay all reasonable attorneys' fees and all other costs and expenses which may be incurred by [plaintiff] in the enforcement of or attempt to enforce this Guaranty, whether by action at law or otherwise."
The trial court denied defendants' motion for fees, stating: "The court previously sustained defendants' demurrer on the ground that the court had `no jurisdiction of the subject of the cause of action alleged in the pleading.' [S]ection 430.10. That ruling was founded on the plain language of the guaranty, where the parties agreed that jurisdiction would be in Arizona and that Arizona law would apply. For the same reason that the court could not determine the merits of the underlying dispute, the court cannot determine the issue of fees. Any dispute must be heard in Arizona and must apply Arizona, not California, law. The Court makes no ruling on the merits of defendants' request for attorney fees." Defendants appeal from that order.

DISCUSSION

I

Subject Matter Jurisdiction Over Complaint
Plaintiff contends that the court erred in sustaining defendants' demurrer for lack of subject matter jurisdiction. We agree with its contention.
A party may demur to a complaint on the basis that the trial court "has no jurisdiction of the subject of the cause of action alleged in the pleading." (§ 430.10, subd. (a).) "`Subject matter jurisdiction ... is the power of the court over a cause of action or to act in a particular way.' [Citations.] By contrast, the lack of subject matter jurisdiction means the entire absence of power to hear or determine a case; i.e., an absence of authority over the subject matter." (Guardianship of Ariana K. (2004) 120 Cal.App.4th 690, 701, 15 Cal.Rptr.3d 817; see also Abelleira v. District Court of Appeal (1941) 17 Cal.2d 280, 288-291,109 P.2d 942.)
Here, plaintiffs complaint alleged causes of action relating to fraud and a breach of a guaranty. These are typical claims for a California court, and do not give rise to a demurrer for lack of subject matter jurisdiction under section 430.10.
Defendants acknowledge that they have found no cases in which a demurrer was used to enforce a choice of forum provision. Nonetheless, they assert a demurrer was proper because the court was obligated to enforce those provisions and therefore lacked subject matter jurisdiction over the dispute. Defendants err in equating a valid choice of forum provision with a lack of subject matter jurisdiction in other courts.
"While ... parties may not deprive courts of their jurisdiction over causes by private agreement [citation], it is readily apparent that courts possess discretion to decline to exercise jurisdiction in recognition of the parties' free and voluntary choice of a different forum.... [¶] No satisfying reason of public policy has been suggested why enforcement should be denied a forum selection clause appearing in a contract entered into freely and voluntarily by parties who have negotiated at arm's length.... [F]orum selection clauses are valid and may be given effect, in the court's discretion and in the absence of a showing that enforcement of such a clause would be unreasonable." (Smith, Valentino & Smith, Inc. v. Superior Court (1976) 17 Cal.3d 491, 495-96, 131 Cal.Rptr. 374, *87 551 P.2d 1206.) "Given the importance of forum selection clauses, both the United States Supreme Court and the California Supreme Court have placed a heavy burden on a plaintiff seeking to defeat such a clause, requiring it to demonstrate that enforcement of the clause would be unreasonable under the circumstances of the case." (Lu v. Dryclean-U.S.A. of California, Inc. (1992) 11 Cal.App.4th 1490, 1493, 14 Cal.Rptr.2d 906.)
The issues relating to a forum selection clause are distinct from the questions of subject matter jurisdiction. The existence of a forum selection clause does not mean that another forum lacks subject matter jurisdiction, and therefore a party seeking to enforce a forum selection clause cannot do so by means of a demurrer asserting lack of subject matter jurisdiction. Instead, two other procedures exist for that purpose. (Cal-State Business Products & Services, Inc. v. Ricoh (1993) 12 Cal.App.4th 1666, 1670, 16 Cal.Rptr.2d 417.)
First, a party may move to stay or dismiss the action on the ground of inconvenient forum. (§ 418.10, subd. (a)(1).) The failure to make such a motion at the time of filing a demurrer constitutes a waiver of the inconvenient forum issue. (§ 418.10, subd. (e)(3).)
Second, and particularly applicable, is section 410.30, subdivision (a), which provides: "When a court upon motion of a party or its own motion finds that in the interest of substantial justice an action should be heard in a forum outside this state, the court shall stay or dismiss the action in whole or in part on any conditions that may be just."
Under this provision, a plaintiff must demonstrate that enforcement of the choice of forum clause would be unreasonable under the facts of the case. (Smith, Valentino & Smith Inc. v. Superior Court, supra, 17 Cal.3d at p. 496, 131 Cal.Rptr. 374, 551 P.2d 1206; see also Lu v. Dryclean-U.S.A. of California, Inc., supra, 11 Cal.App.4th at p. 1493, 14 Cal.Rptr.2d 906.)
While the court could have considered this matter on its own motion as authorized by section 410.30, subdivision (a), that is not what happened, and defendants err in suggesting otherwise. The court did not mention either of the inconvenient forum statutes in making its ruling, nor did it consider any issues relating to the reasonableness of enforcing the parties' choice of forum provisions as required under section 410.30, subdivision (a). Instead, the court sustained defendants' demurrer for lack of subject matter jurisdiction, explicitly citing section 430.10, subdivision (a) as authority for its decision. That ruling was erroneous. A challenge to the forum selection clause cannot properly be raised by demurrer. We therefore reverse the judgment of dismissal and remand the matter to the trial court.

II

Motion for Attorney Fees
Having prevailed on their demurrer, defendants sought to recover attorney fees under the provisions of the lease and guaranty. The court denied that request, reiterating that it was without jurisdiction to decide any facet of this case.
The reversal of the underlying judgment necessarily requires that we vacate the court's order on attorney fees.

DISPOSITION
The judgment is reversed, and the order on attorney fees is vacated. The parties are to bear their own costs on appeal. *88 (Cal. Rules of Court, rule 8.276(a)(3) & (a)(4).)
We concur: SIMS, Acting P.J., and CANTI-SAKAUYE, J.
