
    BHP PETROLEUM (AMERICAS), INC., a Delaware corporation, Appellant (Plaintiff), v. TEXACO EXPLORATION AND PRODUCTION, INC., a Delaware corporation, Appellee (Defendant).
    No. 98-117.
    Supreme Court of Wyoming.
    March 31, 2000.
    Representing Appellant: David F. Evans and Richard D. Bush of Hickey, Mackey, Evans, Walker & Stewart, Cheyenne, Wyoming.
    
      Representing Appellee: Richard E. Day and Scott W. Skavdahl of Williams, Porter, Day & Neville, Casper, Wyoming; and Dennis Cameron of Gable & Gotwals, Inc., Tulsa, Oklahoma.
    Before LEHMAN, C.J., and THOMAS, MACY, GOLDEN, and TAYLOR, JJ.
    
      
       Retired November 2, 1998.
    
   THOMAS, Justice.

The issue presented in this case is where, as a matter of law, did a cause of action on a claim for breach of contract arise. In granting a motion for summary judgment in favor of Texaco Exploration and Production, Inc. (Texaco), the district court ruled that the cause of action arose in Colorado, and it invoked the Colorado statute of limitations pursuant to Wyo. Stat. Ann. § 1-8-117 (Lexis 1999). A collateral issue is raised of waiyver of the defense of the statute of limitations by the failure to plead it as an affirmative defense in the answer. We conclude that the district court correctly determined on the undisputed facts that the claim for breach of contract was a cause of action that arose in Colorado, and it correctly applied the Colorado statute of limitations in granting summary judgment. We also hold that the defense of the statute of limitations was not waived by the failure to plead it as an affirmative defense in the answer. The Summary Judgment entered in the district court is affirmed.

The issues, as they are articulated in the Brief of Appellant BHP Petroleum, Inc., are:

I. Does the Colorado statute of limitations apply to bar a breach of contract action for the payment of royalties on Wyoming oil & gas production from the Madden Deep Unit?
II, Can the statute of limitations be raised for the first time on summary judgment?

As stated in the Brief of Appellee Texaco Exploration & Production Inc., the issues are:

1. Did the District Court correctly apply the Wyoming Borrowing Statute in finding that BHP's breach of contract action arose in Colorado and was, therefore, time barred by the Colorado Statute of Limitation?
2. Was the Statute of Limitation defense timely raised by Texaco and if not, was BHP prejudiced by Texaco's raising it in its Motion for Summary Judgment in November of 19987

BHP Petroleum (Americas), Inc. (BHP) and Texaco both owned working interests in the Madden Deep Unit (Madden Unit), a large federal oil and gas unit that is located in the northeastern corner of the Windriver Basin in Fremont and Natrona Counties BHP was also the operator of the Madden Unit. At the time material to this dispute, there were twenty-one working interest owners in the unit and 160 royalty owners. The diverse ownership made calculation of royalty payments complex. Disagreement arose among several of the working interest owners with respect to the appropriate calculations, and BHP sought to change the method of paying royalties from the existing "entitlement method" to the Unit Allocation Method (UAM) Pursuant to the UAM, BHP would have been responsible for the payment of royalty to all royalty owners in the Madden Unit, and Texaco then would reimburse BHP for Texaco's portion of the royalties paid.

The Madden Unit is a federal unit, and the Minerals Management Service, United States Department of Interior (MMS), has supervisory authority with respect to the valuation and payment of the royalties on all of the federal leases in the Madden Unit. The Madden Unit encompasses eight participating areas, including the Cody Formation Participating Area (Cody PA). Texaco's interest in the Madden Unit was 2.5% of the Cody PA. The Cody PA is comprised of 57.26% federal land, 7.59% state land, and 85.15% patented land. MMS has no jurisdiction with respect to any matters relating to the payment of royalties on any private leases.

Pursuing the effort to change the method of royalty payment from the "entitlement method" to the UAM, BHP formally submitted an application to change the royalty calculation method to the UAM to the Colorado office of MMS in April of 1988. The application was not intended to amend the Madden Deep Operating Agreement, Unit Agreement, or any other agreements relating to the Madden Unit, because the operating agreement did not specifically address the payment of royalties. Following the application, correspondence was exchanged between MMS and a former operator of the Madden Unit who at that time was regional land manager for BHP in its Denver, Colorado, office and was charged with the responsibility of the Madden Unit and the application to MMS for implementation of the UAM. A letter from MMS stated:

Any action by MMS regarding BHP's Unit Allocation Method will only affect the valuation for royalty payment purposes of that portion of net production attributable to Federal leases within the Madden Deep Unit. The value of other production subject to internal balancing agreements and various independent contractual requirements is an issue to be settled by the royalty interest owners and their respective lessees.

The shift in royalty payment methodology required BHP to pay royalties on unit sales to all royalty owners including Texaco's royalty obligation to its lessor. The payment to royalty owners in the Cody PA would be made from BHP's home office in Texas and the reimbursements would be made by the Texas office of Texaco.

The application to change the royalty payment method was prepared, executed, and filed in the Colorado office of MMS. After submitting the application to MMS, BHP instituted discussions with respect to the royalty payment method with an attorney for Texaco, who was located in the Colorado office of Texaco. 'The Texaco attorney submitted a letter to MMS, sent from the office in Colorado, expressing concern about the UAM for the Madden Unit as well as about uniformity in the method of allocations and valuations for royalty payments for its federal leases. This letter was sent in August of 1988, and included the statement that Texaco "will cooperate with BHP in implementing the Unit Allocation Method * * * for the payment of all royalties in the subject unit." With respect to the merits of this litigation, BHP claims that its application to MMS constituted an offer to Texaco to participate in the UAM and that the August letter from Texaco to MMS constituted an acceptance of BHP's offer. The application and the Texaco letter created the alleged contract between BHP and Texaco.

On September 19, 1988, some six weeks after Texaco sent its letter to MMS, the Colorado office of BHP wrote to the Texas office of Texaco specifically requesting assistance in implementing the UAM. In that letter, BHP stated that it was "anxious to secure Texaco's cooperation in implementing the Unit Allocation Method of paying royalties to all royalty owners in the Madden Deep Unit * * *." BHP recognized that historically Texaco had paid its own royalties, and it pointed out that if Texaco desired to continue with that method, the UAM would require Texaco to distribute royalties to over 100 royalty owners participating in the Madden Unit. BHP proposed that Texaco allow BHP as unit operator to pay royalties on its behalf and then be reimbursed by Texaco.

The Texas office of Texaco did not respond to the suggestion of BHP until April 28, 1989. Writing to the Colorado office of BHP, Texaco's manager of operations advised that "Texaco hereby advises that it shall not participate in this [UAM] method for payment of royalties. Texaco shall continue to pay its royalty owners * * *." BHP's theory in bringing its action was that this letter constituted a breach of the contract earlier formed. BHP alleges that Texaco had begun nominating volumes of gas greatly in excess of its ownership percentage in the Madden Unit, forcing BHP, as operator, to pay the remaining royalty owners under the UAM for the exeess production attributable to Texaco between 1988 and 1990. BHP alleges that acting in accordance with the UAM, it paid in excess of $1,000,000.00 on Texaco's behalf, and the action that led to this appeal was brought to recover damages resulting from the breach of contract from Texaco.

BHP commenced this action against Texaco in the Wyoming state court on February 22, 1996. On November 14, 1997, following discovery, Texaco filed a motion for summary Judgment asserting that the action was barred by the applicable Colorado statute of limitations. The district court agreed that the Colorado statute of limitations was applicable pursuant to Wyoming's borrowing statute, Wyo. Stat. Ann. § 1-8-117, and on February 25, 1998, it granted Texaco's motion. BHP appeals from the Summary Judgment entered in the district court.

Summary judgment is appropriate when no genuine issue of material fact exists and the moving party is entitled to judgment as a matter of law. Estate of Noell v. Nor-west Bank Wyoming, N.A., 960 P.2d 499, 500 (Wyo0.1998). On appeal, we examine the record ourselves to determine if the trial court erred in concluding that there were no genuine issues of material fact and that judgment as a matter of law is appropriate. Krier v. Safeway Stores 46, Inc., 948 P.2d 405, 408 (Wyo.1997). In this instance, whatever factual issues exist with respect to the merits of the breach of contract case, there is no difference between the parties with respect to the date on which the action was commenced and the date on which the alleged breach was committed. These are the only material facts for purposes of invoking the statute of limitations.

The resolution of this case is controlled by the determination of where the cause of action arose. This is so because of our borrowing statute, Wyo. Stat. Ann. § 1-3-117, which provides:

If by the laws of the state or country where the cause of action arose the action is barred, it is also barred in this state.

BHP contends that the cause of action arose in Wyoming, and, therefore, the applicable statute of limitations allows it ten years to file its complaint. Texaco supports the determination of the district court, asserting that the breach of the contract occurred in Colorado and that marks the accrual of the cause of action. Texaco invokes the borrowing statute and argues that the applicable statute of limitations is that of Colorado pursuant to which BHP's claim would have to be brought within six years.

The thread of the argument presented by BHP is tenuous. The essential premise is that in Stanbury v. Larsen, 808 P.2d 349, 355 (Wyo.1990), this Court adopted Restatement (Second) Conflict of Laws § 188 (1971). BHP then contends that since that provision utilizes the "most significant relationship" test, the cause of action arose in Wyoming because the subject matter of the contract is Wyoming minerals. The elements articulated in the "most significant relationship" test include "(@) the place of contracting, (b) the place of negotiation of the contract, (c) the place of performance, (d) the location of the subject matter of the contract, and (e) the domicil, residence, nationality, place of incorporation and place of business of the parties." Restatement (Second) Conflict of Laws § 188 at 575. In its argument, BHP focuses upon the location of the subject matter of the contract. The best way to demonstrate the context of the citation of Restatement (Second) of Conflict of Laws § 188 in Stanbury is to quote from that opinion:

The borrowing statute does not apply to a cause of action which arose in Wyoming. Hamilton v. General Motors Corp., 490 F.2d 2283 (7th Cir.1978); Restatement (See-ond) Conflicts of Law § 188 (1971).

Stamnbury, 808 P.2d at 355. It is clear that the citation to Restatement (Second) Conflict of Laws § 188 is in support of a textual statement which assumes that the place where the cause of action arose was determined to be Wyoming before invoking the Restatement.

We are satisfied that the decision of the district court must be tested by our decisions in Stanbury, Cherry Creek Dodge, Inc. v. Carter, 788 P.2d 1024 (Wyo0.1987), and Can-tonwine v. Fehling, 582 P.2d 592 (Wyo.1978). In the first of those cases, Cantornwinge, the action was brought to recover payment on demand promissory notes. We identified factors in making the determination as to where such a cause of action arises, stating:

Generally, in making a determination as to where a cause of action on a promissory note arises, the courts consider such factors as the place of execution and delivery and the place of payment. Western Soils Company v. Skolimess, N.D.Iowa, 370 F.Supp. 831, 888. When, however, the promissory notes in question are demand instruments, further matters must be considered within the context of these general factors.
The cause of action on a demand note arises immediately upon its execution and delivery, which-in turn-determines where the cause of action acerues for purposes of applying statute-of-limitation provisions. * * * Gince the fime when a cause of action accrues is related directly to the place where the cause of action accrues, we hold that the cause of action herein arose in Wyoming.

Cantonwine, 582 P.2d at 597-98 (emphasis in original). Similar factors were invoked in Cherry Creek Dodge, Inc., which we identified as "negotiations, delivery and payment * * *." Cherry Creek Dodge, Inc., 738 P.2d at 1027. In that case, there is an indication that we were relying upon Restatement (See-ond) Conflict of Laws § 188 to identify those factors, but the case was decided on its merits under the applicable provisions of the Uniform Commercial Code. Cherry Creek Dodge, Inc., 738 P.2d at 1027-28. In Stan-bury, Cantonwine was distinguished, but similar factors were invoked by the ruling of the district court, which was affirmed by this Court. We noted that the Stambury note was executed in California, but delivered in Wyoming. The note was payable in Wyoming, and the Wyoming statute of limitations was applied. Stanbury, 803 P.2d at 355. In this instance, Texaco argues the same approach in making the determination as to the place where the cause of action arose.

The factors that we have invoked in connection with promissory notes are readily transferable to an executory contract. BHP reads too much into Stambury, and by association Cherry Creek Dodge, Inc. We do not understand that this Court adopted the "most significant relationship" test of Restatement (Second) Conflict of Laws § 188. Our analysis persuades us that we invoked the Restatement provision only as containing examples of factors to be considered in making the determination as to where the cause of action arose. The argument by Texaco is more accurate in pointing out that we did not change our approach to reaching a determination as to where a cause of action arose in Stanbury.

As we analyze the undisputed facts in this case in light of our prior cases, it is clear that the contract was formed in Colorado where BHP submitted its application to MMS to change the royalty payment method and where the Texaco letter of August 2, 1988, which BHP points to as acceptance, was mailed to the Colorado MMS office. The contract was negotiated and made in Colorado, and the requisite instruments were delivered there.

If we look to the place of payment or performance, we necessarily must consider the application of Texas law. Texas law would require that the action be filed in four years. Tex. Civ. Prac. & Rem.Code Ann. § 16.004 (Vernon 1986 & Cum.Supp.2000). The execution of this contract would require BHP, as the operator, to pay all the royalty interest owners, and then charge the individual working interest owners for their pro-rata share of such royalty payments based upon the production allocated to them individually. Those payments to royalty owners were to be made from the Texas office of BHP. The invoices for reimbursement would be sent from the Texas office of BHP to the Texas office of Texaco and the payments made from that office.

BHP's argument first focuses upon the adoption of Restatement (Second) of Conflict of Laws $ 188 and then focuses upon only one of the factors set forth in the Restatement. We are satisfied that even the Restatement assumes that all factors will be considered, and we note that the complaint filed by BHP follows the general rule "that a cause of action for a breach of contract accrues at the time of the breach." Moncrief v. Sohio Petroleum Co., 775 P.2d 1021, 1028 (Wyo.1989), Thomas, J., concurring. This factor, relied upon by Texaco, would lead to a conclusion that the letter of April 28, 1989 in which Texaco informed BHP that Texaco would not participate in the UAM demonstrated the breach. That letter was sent from Texas to the Colorado office of BHP, arriving there on May 8, 1989. We agree that the breach occurred in Colorado where BHP received the letter.

Analyzing the factors that we have previously recognized, we are satisfied that this cause of action arose in Colorado, and under Wyoming's borrowing statute the secure statute of limitations found in Colo. § 13-80-108(6) (1999) controls. The contract was made in Colorado and the documents were delivered there. Texas conceptually was the place of performance, but the breach that is alleged clearly occurred in Colorado. The location of the mineral production in Wyoming, the subject matter of the contract, is only one factor not the paramount factor that demonstrates the most significant relationship of the parties. With respect to the transaction which is the subject matter of this action, far more occurred out of Wyoming than in Wyoming. We, therefore, agree with the district court that the cause of action was barred in the place where it arose and is barred pursuant to Wyoming's borrowing statute.

The second issue presented by BHP relates to the fact that Texaco did not plead the statute of limitations as an affirmative defense and, for that reason, Texaco is foreclosed from claiming it as a basis for summary judgment. We addressed this issue in Loftus v. Romsa Const., Inc., 913 P.2d 856, 862 (Wyo.1996), in which we said "[the presentation of affirmative defenses by motion will depend upon a conclusion that there is no prejudice to the opposing party." In the Loftus case, we found guidance and persuasive authority from other jurisdictions in which the policy considerations that permit a party to amend its pleadings under W.R.C.P. 15 or move for summary judgment were weighed. Loftus, 913 P.2d at 861. Both of these procedural devices permit a party to raise an affirmative defense by a summary judgment motion even if it was not pleaded in the answer. We resolved that question and established our precedent by saying "the assertion of an affirmative defense in a motion for summary judgment is not only appropriate, but is just." Id. at 862.

The record demonstrates that BHP had ample opportunity to respond to the motion for summary judgment presented by Texaco, and it did not demonstrate any prejudice. To hold that Texaco was precluded from presenting the statute of limitations in its motion for summary judgment would be unjust. As we said in Loftus, 913 P.2d at 862, "[a] party should not be deprived of his right to prevail on the merits by some technical failure in the pleadings." That resolution was further supported by reliance upon W.R.C.P. 15 pursuant to which a court in Wyoming is permitted to amend the pleadings of the parties based on the issues and evidence presented at trial and there appears no valid reason why they cannot be deemed amended to reflect the issues and evidence presented in a motion for summary judgment. Loftus, 913 P.2d at 861. Without question, Texaco could have amended its answer prior to any trial and could have presented the affirmative defense of the statute of limitations. BHP could not have prevented such an amendment if the district court chose to allow it, and we hold that the district court correctly permitted Texaco to raise the statute of limitations for the first time in its summary judgment motion.

To summarize briefly, we are satisfied that this cause of action arose in Colorado where the alleged contract was made and allegedly was breached. That conclusion invokes our borrowing statute which requires us to apply the Colorado statute of limitations barring BHP's claim because it was filed seven years after it accrued. Restatement (Second) of Conflict of Laws § 188 does not foreclose or change our application of the cases we have cited, and we are satisfied that they represent the law in Wyoming. Texaco was not estopped from raising the defense of the statute of limitations in its motion for summary judgment.

The district court's summary judgment entered on February 25, 1998, reflecting the reasoning articulated in the judge's decision letter of February 6, 1998, is affirmed. 
      
      . The Madden Unit is "one of the major oil and gas production units presently operating in Wyoming * * *." BHP Petroleum Co., Inc. v. State, 784 P.2d 621, 623 n. 3 (Wyo.1989). After the Madden Unit was developed, the unit was created in 1968, and consists of 69,253.20 acres of which 83.79% is federal land, with the balance belonging either to the state or patented mineral owners.
     
      
      . The "entitlement method" refers to a method by which the total volumes of production from a given participating area would be allocated back to each tract on the basis of that tract's relative percentage of ownership in the participating area. The royalty owners in that tract would be accounted to for the production allocated to that tract valued at the contract price that the working interest owners or the lessees of that tract were entitled to receive under their particular gas sales contract. Under the UAM, the volume of production accounted/attributed to each royalty owner is based upon the volumes that would be deemed to be allocated/attributed to their respective tracts. That production is then valued at the weighted average price received by all of the working interest owners within the unit.
     