
119 P.3d 541 (2004)
William W. HEWITT and Valley Park Apartments, Inc., a Colorado corporation, Plaintiffs-Appellants,
v.
Thomas S. RICE, Brian R. Reynolds, and Senter Goldfarb & Rice, a Colorado limited liability company, Defendants-Appellees.
Nos. 03CA0984, 03CA1092.
Colorado Court of Appeals. Division III.
December 30, 2004.
Certiorari Granted August 22, 2005.
*543 William A. Cohan, P.C., William A. Cohan, San Diego, California, for Plaintiffs-Appellants.
Treece, Alfrey, Musat & Bosworth, P.C., Michael L. Hutchinson, Carol Lynn Thomson, Denver, Colorado, for Defendants-Appellees.
Opinion by Judge PICCONE.
In this malicious prosecution action, William W. Hewitt and Valley Park Apartments, Inc. (VPA) appeal the judgment dismissing their complaint against Thomas S. Rice, Brian R. Reynolds, and Senter Goldfarb & Rice (SGR). We affirm.

I. Procedural Background

A. 1991 Litigation
In 1991, Hewitt brought a lender liability action against Pitkin County Bank & Trust Company (bank) and two of its officers. The bank was represented by Rice and SGR. After prolonged litigation, the bank obtained an $84,164.55 judgment against Hewitt. See Hewitt v. Pitkin County Bank & Trust Co., 931 P.2d 456 (Colo.App.1995).

B. 1998 Litigation
In October 1998, the bank, represented by Rice, Reynolds, and SGR, filed suit against Hewitt and VPA. The complaint alleged Hewitt had transferred real property to VPA in violation of the Colorado Uniform Fraudulent Transfer Act (CUFTA), § 38-8-101, et seq., C.R.S.2004; that VPA was the alter ego of Hewitt; and that Hewitt was contractually liable to the bank for additional attorney fees and costs incurred in connection with the collection action. SGR, Rice, and Reynolds recorded a notice of lis pendens against the real property that was the subject of the fraudulent transfer claim. VPA asserted counterclaims against the bank, alleging slander of title, intentional interference with contractual relationship, and abuse of process regarding the lis pendens and also alleging that the bank's claims were frivolous and groundless.
In late 1999, Hewitt paid the full amount of the judgment to the bank. The bank released its notice of lis pendens and moved to dismiss its fraudulent transfer and alter ego claims. The motion to dismiss was unopposed. The bank did not dismiss its claim for attorney fees.
Thereafter, SGR, Rice, and Reynolds moved to withdraw from representation of the bank based on the possibility that Rice and Reynolds would be trial witnesses in connection with the pending counterclaims. The court granted the motion to withdraw, and new counsel appeared on the bank's behalf. VPA amended its counterclaims to add Rice and SGR.
In May 2002, Hewitt and VPA entered into a settlement agreement with the bank whereby they agreed to dismiss the counterclaims against the bank in exchange for a cash payment, and the bank agreed to dismiss its attorney fees claim. The court granted the stipulated motion to dismiss filed by the bank, VPA, and Hewitt. Each party agreed to bear its own costs and fees.
In July 2002, the court granted summary judgment against VPA and in favor of Rice and SGR, finding that the counterclaims were barred by the statute of limitations. After the entry of summary judgment, Hewitt and VPA moved for leave to amend to add a counterclaim for malicious prosecution, but soon withdrew that motion.

C. 2003 Litigation
In January 2003, Hewitt and VPA filed a complaint against SGR, Rice, and Reynolds (collectively the lawyers), asserting a claim of malicious prosecution for their conduct in the 1998 collection action. Hewitt and VPA alleged that the lawyers "knew or should have known that it was unnecessary to bring a separate action to collect the bank's judgment against Mr. Hewitt"; "knew or should have known that there was no fraudulent transfer by . . . Hewitt to VPA prior to filing the CUFTA action"; and "knew or had reason to know that the CUFTA action and *544 Notice of Lis Pendens lacked any reasonable basis in law or fact."
The lawyers filed a motion to dismiss for failure to state a claim pursuant to C.R.C.P. 12(b)(5). The trial court concluded the bank's voluntary dismissal of CUFTA and alter ego claims was not a resolution in Hewitt's and VPA's favor and granted the lawyers' motion, dismissed the action, and awarded the lawyers attorney fees pursuant to § 13-17-201, C.R.S.2004, and costs. This appeal followed.

II. Standard of Review
When considering a motion to dismiss under C.R.C.P. 12(b)(5), the court must accept all averments of material fact as true, and the allegations of the complaint must be viewed in the light most favorable to the plaintiff. Dorman v. Petrol Aspen, Inc., 914 P.2d 909, 911 (Colo.1996); see also Bedard v. Martin, 100 P.3d 584 (Colo.App.2004). The court must consider only matters stated in the complaint and must not go beyond the confines of the pleading. Fluid Tech., Inc. v. CVJ Axles, Inc., 964 P.2d 614, 616 (Colo.App.1998). While motions to dismiss for failure to state a claim are viewed with disfavor, they may properly be granted where it appears beyond doubt that the plaintiff can prove no set of facts to sustain the claim. Bedard, supra.
We review a trial court's determination on a motion to dismiss de novo. Fluid Tech., Inc. v. CVJ Axles, Inc., supra.

III. Malicious Prosecution
Hewitt and VPA contend the trial court erred in concluding that the voluntary dismissal of the claims against Hewitt and VPA and the settlement of the bank's remaining claim and VPA's counterclaims do not constitute a favorable termination for purposes of a malicious prosecution action. We disagree.
The purpose of an action for malicious prosecution is to compensate a person sued in a malicious and baseless legal action for attorney fees, costs, psychic damage, and loss of reputation. Walford v. Blinder, Robinson & Co., 793 P.2d 620 (Colo.App.1990). To prevail on a claim for malicious prosecution, a plaintiff must establish (1) the defendant contributed to bringing a civil or criminal proceeding against the plaintiff; (2) the proceeding was resolved in favor of the plaintiff; (3) there was no probable cause for the proceeding; (4) the defendant acted with malice; and (5) the plaintiff incurred damages. Thompson v. Maryland Cas. Co., 84 P.3d 496, 503 (Colo.2004); Walford, supra.
Whether the underlying claim was resolved in favor of the party prosecuting the malicious prosecution claim is a question of law. See Restatement (Second) of Torts § 673(1)(b) & cmt. (1977).
To be terminated in favor of the malicious prosecution plaintiff, the prior proceedings must be dismissed on the merits. See Walford, supra.
To show a termination in one's favor, a plaintiff must prove that the court passed on the merits of the charge or claim against him in such circumstances as to show one's innocence or non-liability, or show that the proceedings were terminated or abandoned at the instance of the defendant in circumstances that fairly imply the plaintiff's innocence.
1 F. Harper et al., The Law of Torts § 4.4 (3d ed.1996). The requirement of a favorable resolution of the prior action applies to civil as well as criminal proceedings. Harper, supra, § 4.4.
The cases in Colorado that have addressed the issue of whether a settlement should be construed as a favorable termination have held that the termination of a criminal matter resulting from negotiation, compromise, settlement, or agreement is not considered a favorable termination. Schenck v. Minolta Office Sys., Inc., 802 P.2d 1131 (Colo.App.1990); Land v. Hill, 644 P.2d 43 (Colo.App.1981); see also Bell Lumber Co. v. Graham, 74 Colo. 149, 219 P. 777 (1923).
Hewitt and VPA argue that the policy reasons for barring a malicious prosecution claim where the underlying criminal action was terminated by settlement do not apply where the prior action was civil. We see no reason to depart from Colorado law simply *545 because the prior proceeding is a civil, rather than a criminal, matter.
A negotiated settlement does not reflect a civil defendant's lack of liability. It reflects a decision by all parties to avoid a determination on the merits. See Restatement (Second) of Torts § 660, cmt. c (treats "compromised" terminations, such as settlement, the same in criminal and civil cases); see also Jaress & Leong v. Burt, 150 F.Supp.2d 1058, 1063 (D.Haw.2001) ("dismissal reflects ambiguously on the merits of the action as it results from the joint action of the parties," and the "purpose of a settlement is to avoid a determination on the merits"); Ferreira v. Gray, Cary, Ware & Freidenrich, 87 Cal.App.4th 409, 104 Cal.Rptr.2d 683 (2001)(a negotiated settlement creates an ambiguity as to the merits of the underlying action, and is entirely inconsistent with bringing a further lawsuit for malicious prosecution); Schwartz v. Schwartz, 366 Ill. 247, 252, 8 N.E.2d 668, 671 (1937) (underlying lawsuit that was dismissed upon acceptance of tender "cannot be said to have been a termination favorable to the appellant for the reason that he paid the amount of the note and interest to its due date in order to procure dismissal of the suit"). These cases support the conclusion that a settlement in a civil case is not a favorable termination for purposes of a malicious prosecution claim.
Hewitt and VPA urge us to adopt a "totality of the circumstances" analysis to determine whether a settlement in the underlying action results in a favorable termination, citing Bradshaw v. State Farm Mutual Automobile Insurance Co., 157 Ariz. 411, 758 P.2d 1313 (1988). In support, Hewitt and VPA argue that the trial court erred in not addressing Colorado cases which "sub silentio" employed a "totality of the circumstances" test to "uphold the viability of the plaintiff's malicious prosecution claims notwithstanding the settlement of the underlying actions." We are not persuaded. The cases that Hewitt and VPA cite in support of this argument are inapposite.
In Buckhannon v. U.S. West Communications, Inc., 928 P.2d 1331 (Colo.App.1996), the division never discussed or commented, much less ruled on, any of the elements of a malicious prosecution claim, because they were not an issue on appeal.
In Schenck, supra, Schenck brought a malicious prosecution action against the defendants, who had initiated civil and criminal actions against him. Schenck and the defendants had settled the civil action, and the district attorney later voluntarily dismissed the criminal charges. The defendants argued that because the dismissal of the criminal complaint resulted from Schenck's settlement of the civil claims, the criminal case was not terminated in his favor. A division of this court rejected the defendants' argument, noting that the civil settlement did not concern the criminal case and the district attorney testified that he sought a dismissal because he concluded he could not prove the case beyond a reasonable doubt.
In Walford, supra, the issue was whether arbitration proceedings may support a claim of malicious prosecution. In answering that question in the affirmative, a division of this court never mentioned, much less employed, a "totality of the circumstances" test. Rather, in construing the "favorable termination" requirement, the division found the arbitration was terminated in favor of the malicious prosecution plaintiff because the arbitration award explicitly stated so.

A. The Bank's Claims Against Hewitt and VPA
In the 1998 action, the bank moved to dismiss the fraudulent transfer and alter ego claims upon payment of the judgment. We conclude this dismissal was not a termination favorable to Hewitt or VPA.
The facts which led to the dismissal of the first two claims are not in dispute. Dismissal followed Hewitt's payment of the judgment. This cannot be characterized as a favorable termination. See Mills County State Bank v. Roure, 291 N.W.2d 1, 4 (Iowa 1980) (payment in full by a bank's debtor "could not have been a more unfavorable result" for the debtor and "is not the kind of favorable termination envisioned by the Restatement").

B. Hewitt's and VPA's Claims Against the Lawyers
The bank's claim for attorney fees and VPA's counterclaims were dismissed pursuant *546 to a negotiated settlement by the bank, Hewitt, and VPA.
Even if we assume the analysis of the counterclaims is necessary to our resolution of the issue before us, because we have concluded that a settlement is not a termination favorable to a malicious prosecution plaintiff, we further conclude the settlement of the counterclaims and the attorney fees claim was not a termination in favor of Hewitt or VPA.

IV. Attorney Fees
Hewitt and VPA contend that the trial court erred in awarding attorney fees pursuant to § 13-17-201. Specifically, they contend that an exception to the statute ought to apply where the dismissed complaint raises a question of first impression. We disagree.
Section 13-17-201 provides, in relevant part:
In all actions brought as a result of . . . injury to a person or property occasioned by the tort of any other person, where any such action is dismissed on motion of the defendant prior to trial under rule 12(b) of the Colorado rules of civil procedure, such defendant shall have judgment for his reasonable attorney fees in defending the action.
In Houdek v. Mobil Oil Corp., 879 P.2d 417 (Colo.App.1994), the trial court dismissed the plaintiffs' complaint pursuant to C.R.C.P. 12(b)(5) and awarded fees to the defendants pursuant to § 13-17-201. A division of this court held that § 13-17-201 applies and controls over § 13-17-102(7), C.R.S.2004, even though the plaintiff brought the action in a good faith attempt to establish new law. We agree with the decision in Houdek and find it dispositive of Hewitt's and VPA's claim.
The judgment is affirmed.
Judge TAUBMAN and Judge VOGT concur.
