
770 P.2d 1009 (1989)
HERITAGE BANK & TRUST, Plaintiff and Appellant,
v.
John LANDON, Defendant and Respondent.
No. 880128-CA.
Court of Appeals of Utah.
February 28, 1989.
John W. Lowe, Salt Lake City, for plaintiff and appellant.
*1010 Ellen Maycock, Salt Lake City, for defendant and respondent.
Before DAVIDSON, BENCH and JACKSON, JJ.
BENCH, Judge:
Plaintiff Heritage Bank & Trust (Heritage) appeals from a district court order dismissing its case with prejudice. Heritage makes several arguments on appeal, but we find dispositive the claim that the trial court erred by precluding the amendment of Heritage's complaint. We reverse and remand the case for further proceedings.
On June 11, 1984, Heritage loaned Phillip A. Rennert $100,000. In exchange, Rennert gave Heritage a promissory note for that amount. A trust deed for real property was also executed and delivered as collateral for the loan. Defendant John Landon was acquainted with Rennert, and, at the time, served on Heritage's board of directors and loan committee.
Rennert failed to repay the loan and Heritage sold the collateral for $8,930. Heritage obtained a deficiency judgment against Rennert for $149,705. Subsequently, Heritage filed this action against Landon, alleging that he had personally guaranteed the loan to Rennert.
Landon filed no answer to the complaint, but immediately moved for dismissal, claiming the action was barred by the statute of frauds.[1] The trial court conditionally granted Landon's motion, giving Heritage 60 days to produce evidence that Landon had personally benefitted from the loan. Heritage then took the depositions of Landon and Rennert. Landon denied any personal guarantee of repayment, although he admitted voting for Rennert's loan. Rennert said that he used all of the loan proceeds for home improvements, and that Landon received no benefit from the loan.
After deposing Landon and Rennert, Heritage sought to amend its complaint, claiming specific performance, detrimental reliance, fraud, and negligent misrepresentation. The trial court denied the motion. Since Heritage had failed to show that Landon had benefitted from the loan, the court dismissed the action with prejudice.
Heritage's motion to amend followed Landon's motion to dismiss, but preceded the filing of an answer. Citing Utah R.Civ. P. 15(a), Heritage asserts that the trial court erred in refusing to allow Heritage to amend its complaint. Rule 15(a) provides, in part, that "[a] party may amend his pleading once as a matter of course at any time before a responsive pleading is served... ." The phrase "responsive pleading" refers to a "pleading which joins issue and replies to a prior pleading of an opponent in contrast to a ... motion which seeks to dismiss on some ground other than the merits of the action." Black's Law Dictionary 1180 (5th ed. 1979). Responsive pleadings include answers to complaints and replies to counterclaims, and necessarily exclude motions. Utah R.Civ. P. 7(a). See also 6 C. Wright & A. Miller, Federal Practice and Procedure § 1483 (1971).
A motion to dismiss, therefore, is not a responsive pleading which would preclude an opponent from amending a complaint under Utah R.Civ.P. 15(a) "once as a matter of course." Vernell v. United States Postal Serv., 819 F.2d 108, 110 (5th Cir.1987).[2] Since the language of the rule entitles a party to amend, it is not a matter within the discretion of the trial court. Id. This holds true even where the party with a right to amend, as here, moves for leave to amend. Stewart v. RCA Corp., 790 F.2d 624, 631 (7th Cir.1986); Zaidi v. Ehrlich, *1011 732 F.2d 1218, 1219-20 (5th Cir.1984). Under those circumstances, the trial court is "obliged to grant this unnecessary request." Stewart, 790 F.2d at 631.
The record indicates that when Heritage moved to amend its complaint, Landon had not yet filed a responsive pleading. Accordingly, the court had no discretion to deny Heritage's motion to amend. The judgment of the district court is therefore reversed, and the case is remanded so that Heritage may amend its complaint.
DAVIDSON and JACKSON, JJ., concur.
NOTES
[1]  We note that affirmative defenses must generally be raised by answer. Gill v. Timm, 720 P.2d 1352, 1353-54 (Utah 1986). See also W.W. & W.B. Gardner, Inc. v. Pappas, 24 Utah 2d 264, 470 P.2d 252, 253 (1970) (the statute of frauds is an affirmative defense under Utah R.Civ.P. 8(c), and is not a defense which may be raised by motion under Utah R.Civ.P. 12(b)).
[2]  As our rules of civil procedure are fashioned after the federal rules, we may properly look to authorities under the federal rules. See Pate v. Marathon Steel Co., 692 P.2d 765, 767 n. 1 (Utah 1984).
