
    515 P.2d 1277
    GALLUP GAMERCO COAL COMPANY, a corporation, Plaintiff-Appellee and Cross-Appellant, v. Ray IRWIN, Mayor, Paul J. McCollum, James Nechero, Dr. E. M. Iverson, Raymond Kauzlarich, Members of the City Commission of Gallup, New Mexico, and the City of Gallup, New Mexico, a municipal corporation, Defendants-Appellants and Cross-Appellees.
    No. 9563.
    Supreme Court of New Mexico.
    Nov. 9, 1973.
    
      Branch, Dickson" & Dubois, Albuquerque, for defendants-appellants.
    Hannett, Hannett, Cornish & Barnhart, Albuquerque, for plaintiff-appellee.
   OPINION

MONTOYA, Justice.

This is an appeal from a judgment awarding damages to plaintiff-appellee Gallup Gamerco Coal Company (appellee) for the failure of defendant-appellant City of Gallup (appellant) to supply an adequate amount of water to appellee. Appellee cross appeals for damages for expenses in repairing the water well, which is the subject of this controversy, and for equitable relief to require appellant to comply with the terms of the lease of the well.

Appellee corporation is the owner of a water well, together with an electric power plant and other property, which was leased to appellant in March 1945 by appellee’s predecessor. That lease agreement was modified and extended in September 1950, extending the term of the lease of the water well until March 31, 1975. The contractual arrangements of the parties were further modified in April 1963. However, the provisions of the original lease, at least so far as this controversy is concerned, were not altered by the 1950 and 1963 modifications and extensions. The obligations of the parties concerning the water well in question, insofar as material to this appeal, are contained in the following provisions of the lease:

“3. Lessee shall be obligated to maintain said well in good and proper condition, and Lessor shall be under no obligation to repair or furnish additional equipment for the proper operation of the same, and shall not be responsible for any failure of such well to supply sufficient water for the operation of said power plant or for any other failure or breakdown of said well.
“13. On termination of this lease by any method hereinbefore provided, Lessee shall yield possession of the said water well and other personal property, the ownership of which has been reserved to Lessor, but the use of which is permitted Lessee, in good condition.
“9. The City agrees to continue to maintain, repair and operate the well of the Company located at Gamerco, New Mexico, reasonable wear excepted, and to furnish the Company water under the present terms and conditions existing between the parties at the time of this Agreement; * *

The facts of the case are as follows. From the inception of the lease in 1945 and until 1965 the well produced water in sufficient quantities to cause neither of the parties any alarm to the extent of undertaking any major testing or repairing of the well, and no such work was done. In 1965 the water production fell off sharply, causing appellee in November of that year to ask appellant to act to remedy the failure. Appellant made no reasonable effort to have the well tested or examined by experts, or do anything of any consequence until November 1968, which followed another drop in production in mid-1968, of which appellee again complained to appellant. During the times that the well was producing at a decreased rate, or was out of production for repair and testing after November 1968, appellee, in order to adequately meet its water needs, was required to purchase water from appellant at higher rates than applied to water taken from the well, the subject of this suit, expending $8,022.74 more than it would have had to pay if the water was obtainable from the well in question and paid for at the lower rate. Following further complaint by appellee, appellant had some work done on the well which did not improve its production to any appreciable extent. Thereafter, from late 1968 through 1970, the parties were in disagreement over the steps to be taken and the parties’ obligation to take steps to improve the well’s production, but they did agree in May 1970, to have the well tested and repaired, sharing the costs. This agreement was entered into with the specific provision that none of the rights of the parties under the lease would be waived by the agreement. Appellee was awarded judgment in the amount of $8,022.74 and cross-appeals for the amounts expended above and beyond the repair agreement in the amount of $2,323.84. The cross appeal alleges the trial court committed error in holding that there was an accord and satisfaction by reason of the agreement between the parties as to the testing and repair of the well, which agreement was reached on May 15, 1970.

Appellant contends that the obligation of appellant, as specified in the pertinent provisions of the lease, was to return the water well in good condition, reasonable wear and tear excepted, at the termination of the lease agreement.

Appellant further contends that the court erred in denying its motion to dismiss for failure to state a claim upon which relief could be granted, for the reason that its obligation to repair did not become enforceable until the expiration of the lease and that no cause of action accrues to the appellee until that time. In support of its contention, appellant couples the repair provisions and the provision that the City is to yield.up possession of the water well in good condition, upon the termination of the lease. Appellant then cites Cruzan v. Franklin Stores Corporation, 72 N.M. 42, 380 P.2d 190 (1963). In that case, an action was brought by lessors for damages for breach of a covenant in a ten-year-building lease for failure to make repairs and return the premises in good order and condition as when entered upon, ordinary wear excepted. The court, speaking through Justice Noble, stated (72 N.M. at 47, 380 P.2d at 194):

“ * * *. The covenant of the lease, with which we are concerned, is one to make the ordinary and usual repairs and to surrender the building in good condition, less ordinary wear. Feuerberg v. Polsky, 180 N.Y.S. 103 (S.Ct.1920) held that a covenant to keep in repair and to surrender the premises in good order and condition obligates the lessee to repair the premises prior to or at the time of termination of the lease. A covenant to surrender the leased premises in as good order and condition as when entered upon relates to the end of the term of the lease and cannot be asserted before expiration of the term. [Citations omitted.] * *

However, like any other written contract, real estate leases must be interpreted as a whole to effectuate the intention of the parties, with meaning and significance given to each part in context of the entire agreement. Waxler v. Humble Oil & Refining Company, 82 N.M. 8, 474 P.2d 494 (1970); Thigpen v. Rothwell, 81 N.M. 166, 464 P.2d 896 (1970). That is what must be done with respect to the provisions of this lease, and particularly provisions 3 and 13, supra. Consequently, we are impressed with appellee’s argument that the lease of a water well can better be likened to an oil and gas lease covering an oil well. Courts have construed oil and gas leases on the theory that oil and gas wells are sui generis, and that a land lease contemplates the use of the surface for lessees’ own purposes in consideration of payment for rent, while the prime objective of an oil and gas lease is the extraction of subsurface oil and gas for the mutual benefit of the parties. In this respect, some of the cases have held that the rights of landlords and tenants do not apply to oil and gas leases. 38 Am.Jur.2d Gas and Oil, § 54 at 529 (1968).

The lease in question is similar to, and should be governed by the doctrines relating to, oil and gas leases. There is precedent in this court for such construction. Darr v. Eldridge, 66 N.M. 260, 346 P.2d 1041, 77 A.L.R.2d 1052 (1959). This is particularly so in the instant case where both appellee and appellant received the benefits of the water produced.

Under the provisions of the lease, appellant is required to operate, maintain and repair the well during the term of the lease, and to make reasonable efforts to supply appellee with water as may be needed by appellee for industrial, mining and domestic uses, at the cost of producing that water. Under its terms, appellant would have exclusive possession of the well and appellee would have no obligation of any nature to repair. Although not identical, this situation is analogous to an oil and gas lease under which the lessor of the property is to be furnised gas by the lessee, either for free or for pay from gas produced on the leased premises. For breach of the duty to furnish gas, the lessor has recourse against the lessee. 38 Am.Jur.2d Gas and Oil, § 84 at 551 (1968), and cases cited therein. Here appellant has not used reasonable efforts to furnish water to appellee, and for breach of its covenants to operate, maintain and repair the well, causes of action arose and were not prematurely brought by the appellee.

The substance of appellant’s third and fourth contentions are that the decrease in production from the well was a result of ordinary wear and tear and deterioration from use and thus excluded appellant from liability. Appellant’s contention is that, based on the testimony of appellee’s expert witness Mr. Leonard C. Halpenny, the deterioration at a lower segment of the pipe was due to corrosion, and that corrosion is ordinary wear. Thus, appellant is excluded from liability. Again, we think appellant misconstrues the effect of the testimony. In his testimony, Mr. Halpenny was asked:

“Q. Now, Mr. Halpenny, maintenance would prevent the deterioration, was that your statement, sir ?
“A. No, ' maintenance probably would not prevent deterioration of a well casing. It would offset the effects of deterioration.
“Q. All right, sir; the deterioration would go on and if it were deteriorated, it would have to be replaced,, would it not ?
“A. Replaced in the sense that it no longer served its original function. By that I mean, not pulled out and the same diameter replaced, but a smaller diameter put inside.”

We find it difficult to accept appellant's position. Taking its theory to its final conclusion would mean that corrosion is ordinary wear and may proceed unchecked and without maintenance, and that it was excused from all liability when the well ceased production. Clearly this was not the intent of the parties as expressed in the lease. Appellant had the duty to repair and maintain the well, according to the terms of the lease hereinbefore quoted. The testimony of Mr. Halpenny indicates that, with proper investigation in 1965, proper maintenance and repair would have continued the well in full production and, though now much more expensive, proper maintenance and repair could restore the well to full production. This is what appellant should have done and what it must do under the terms of the lease.

Appellee, in its cross appeal, alleges that the agreement of May 15, 1970, was incorrectly construed by the district court as an accord and satisfaction, except as to the claimed damages for lack of water. We think appellee’s point is well taken.

Under our Rule of Civil Procedure 8(c), (§ 21-1-1 (8) (c), N.M.S.A., 1953 Comp.), accord and satisfaction is an affirmative defense which must be affirmatively pled, and upon which the party so alleging has the burden of proof. An affirmative defense must be pleaded, and if not pleaded or otherwise properly raised, it is waived. Fredenburgh v. Allied Van Lines, Inc., 79 N.M. 593, 446 P.2d 868 (1968). See 2A Moore’s Federal Practice, para. 8.27 [3] at 1853 (2d Ed. 1972). Accord and satisfaction was neither affirmatively pled in appellant’s answer, nor was it argued at any stage of the proceedings. It is, therefore, waived.

In view of the foregoing, we deem it unnecessary to decide appellee’s second point on cross appeal, that it is entitled to a mandatory injunction requiring appellant to comply with the terms and conditions of the lease. However, as already stated, appellant is obliged- to properly repair, restore and maintain the well at a level of full production.

We, therefore, hold that the part of the decision awarding damages to appellee in the amount of $8,022.74 is affirmed. That portion of the court’s decision set forth in its conclusion of law No. 2, ruling that an accord and satisfaction was reached by the parties, is reversed. Accordingly, the cause is remanded to the trial court to set aside its former judgment and to award appellee damages in the amount of $8,022.-74 because of the higher rates paid for water, and for determination of additional damages suffered by appellee and cross appellant for amounts necessarily expended above and beyond the repair agreement between the parties in an attempt to rehabilitate the well, to enter judgment accordingly, and to further proceed in a manner consistent with this opinion.

It is so ordered.

McMANUS, C. J., and OMAN, J., concur.  