
776 P.2d 837 (1989)
Roy WEIBLE, Plaintiff and Appellant,
v.
RONAN STATE BANK, Defendant and Respondent.
No. 88-526.
Supreme Court of Montana.
Submitted on Briefs April 6, 1989.
Decided July 19, 1989.
Michael F. Bailey, Joseph M. Goldman Law Offices, Missoula, for plaintiff and appellant.
Sam E. Haddon, Boone, Karlberg & Haddon, Missoula, Ingraham Law Office, Ronan, for defendant and respondent.
HUNT, Justice.
Plaintiff Roy Weible appeals from an order of the Twentieth Judicial District Court, Lake County, dismissing his complaint against defendant Ronan State Bank. We affirm.
The dispositive issue raised on appeal is as follows:
Were the claims asserted by Weible in his complaint based solely on a tort action for injury to or trespass on property, and, as such, barred by a two-year statute of limitations?
Beginning in 1973, Roy Weible and his wife, Alta Weible, executed several new and renewal promissory notes to Ronan State Bank. As collateral securing the performance of the notes, the Weibles executed and delivered to the Bank an assignment of their buyers' interest in certain real property, a mortgage upon that property and a security agreement covering personal property.
As of September 9, 1985, the promissory notes were in default. The Bank initiated an action to obtain judgment upon the notes and a decree of foreclosure of the real property. On May 28, 1986, a hearing on the Bank's motion for summary judgment was held, at which time counsel for the Weibles stipulated to the summary judgment and agreed no defenses could be raised. The formal judgment and decree of foreclosure was entered on August 4, 1986.
On June 3, 1986, after the hearing on summary judgment but prior to the entry of judgment, agents of the Bank entered onto Roy Weible's real property and removed farm machinery used as collateral in the personal property security agreement. On August 3, 1988, more than two years after the removal of the machinery, Weible filed a complaint against the Bank and Stedje Brothers, Inc., alleging that the Bank breached the security agreement by failing to give ten days notice prior to seizure of the farm machinery as required *838 by the agreement, trespassing upon his property and wrongfully removing the equipment. On August 5, 1988, Weible filed an amended complaint, dropping Stedje Brothers as a defendant.
In response to the complaint, the Bank filed a motion to dismiss. After a hearing, the District Court granted the Bank's motion on the grounds that Weible's claims were barred by the statute of limitations, the doctrine of res judicata and the compulsory counterclaim rule.
On appeal, Weible contests each of the grounds upon which the District Court based its determination. We will not discuss the res judicata and compulsory counterclaim questions, however, because the statute of limitations issue is dispositive of the appeal.
Weible argues that the District Court erred in concluding that the action against the Bank was barred by the statute of limitations. The District Court held that Weible's complaint rested solely on the tort theories of trespass on and injury to real and personal property, and, therefore, the complaint was barred by § 27-2-207, MCA, the two-year statute of limitations pertaining to actions involving injury to property. Weible argues that his complaint was also based on breach of the security agreement, and, therefore, the action was governed by § 27-2-202(1), MCA, the eight-year statute of limitations pertaining to actions involving breach of a written contract.
In determining which statute of limitations applies, the court will look to the substance of the complaint. If the gravamen of the action rests strictly on tort theories, the statute of limitations pertaining to torts will apply. Likewise, if the gravamen of the action rests strictly on contract theories, the statute of limitations pertaining to contracts will apply. Castillo v. Franks (1984), 213 Mont. 232, 239, 690 P.2d 425, 428; Quitmeyer v. Theroux (1964), 144 Mont. 302, 311, 395 P.2d 965, 969. If the gravamen of the action is such that it may rest either in tort or contract, the injured party may elect the theory he will pursue and the statute of limitations governing the elected theory will apply. Unruh v. Buffalo Bldg. Co. (Mont. 1981), 633 P.2d 617, 618, 38 St.Rep. 1156, 1158. If doubt exists as to the gravamen of the action, the longer statute of limitations will apply. Thiel v. Taurus Drilling Ltd. 1980-II (1985), 218 Mont. 201, 212, 710 P.2d 33, 40.
In his amended complaint, Weible alleged the following:
That on or about the 3rd day of June, 1986, Defendant Ronan State Bank through two (2) of its acting agents... trespassed upon the farm property of Plaintiff's and wrongfully removed the Plaintiff's farm machinery.
.....
[T]he security agreement ... states that a ten (10) day notice shall be given to the party in default to surrender the collateral at a mutually agreed time and place. That the Defendant Ronan State Bank breached this security agreement in trespassing upon Plaintiff's property and wrongfully removing his farm machinery. This was done before final judgment was made and entered in the real property foreclosure and done without the required notice to the party in default.
.....
Defendant Ronan State Bank willfully and maliciously trespassed upon Plaintiff's farm property and with willful and malicious intent, wrongfully removed Plaintiff's farm machinery. This was done in an oppressive way and/or manner which violated the rights of Plaintiff with unnecessary harshness and/or severity as Defendant Ronan State Bank misused and abused their [sic] authority and power when they [sic] breached the security agreement.
Weible argues that these allegations set out a breach of contract action. Indeed, viewed in the light most favorable to Weible, the complaint does allege a breach of the security agreement for failure to give notice. However, the injuries claimed as a result of the breach of contract  the trespass and wrongful removal of farm machinery  constitute tort theories of action. *839 Although the injuries to Weible may have originated in breach of contract, the acts causing his damages sound in tort. Therefore, the gravamen of the action is in tort, not contract, and the tort statute of limitations applies. Quitmeyer, 144 Mont. at 311, 395 P.2d at 969.
A two-year statute of limitations governs actions arising from trespass to and conversion of property. Section 27-2-207, MCA. The injury in question occurred on June 3, 1986. The complaint was filed in August, 1988  over two years later. The action is barred by the two-year statute of limitations.
Affirmed.
TURNAGE, C.J., and HARRISON, SHEEHY and McDONOUGH, JJ., concur.
