
233 Kan. 351 (1983)
662 P.2d 255
EDNA PRAY AND FRANK CARNEY, Appellees,
v.
PREMIER PETROLEUM, INC., EDWIN LINQUIST, CARL SWAN, and L.A. WATSON, Appellants.
No. 54,632
Supreme Court of Kansas.
Opinion filed April 29, 1983.
Richard D. Greene, of Morris, Laing, Evans, Brock & Kennedy, Chartered, of Wichita, argued the cause and was on the brief for the appellants.
Gregory J. Stucky, of Fleeson, Gooing, Coulson & Kitch, of Wichita, argued the cause and Robert T. Cornwell, of the same firm, was with him on the brief for the appellees.
The opinion of the court was delivered by
*352 HERD, J.:
This is an action to quiet title to real estate. The appeal is from the trial court's order quieting the title in favor of the landowner by holding an oil and gas lease thereon had terminated due to nonproduction.
Edna Pray is the landowner. In 1977 she entered into a contract for deed with Frank Carney pursuant to which Mr. Carney would purchase the land in question.
Previously, on August 7, 1973, Edna Pray and Premier Petroleum, Inc., had executed an oil and gas lease covering Pray's property. The lease contained the standard provisions with a primary term of two years "and as long thereafter as oil and gas, or either of them, is produced from said land by the lessee, or the premises are being developed or operated." The lease also contained a "shut-in" royalty clause which provided:
"The lessee shall pay lessor as royalty 1/8 of the proceeds from the sale of gas as such at the mouth of the well where gas only is found and where such gas is not sold or used, lessee shall pay or tender annually at the end of each yearly period during which such gas is not sold or used as royalty, an amount equal to the delay rental provided in the next succeeding paragraph hereof, and while said royalty is so paid or tendered this lease shall be held as a producing lease under the above term paragraph hereof...."
In January of 1974, during the primary term of the lease, Premier began drilling operations on the property. The well, Pray No. 1, was completed in March of 1974. On August 7, 1975, Premier filed an "Affidavit of Production" stating "a gas well producing or capable of producing gas in paying quantities" had been completed on the Pray property.
Premier's efforts to market the gas from Pray No. 1 were fruitless since it was the only gas well in the area and was three miles from a gas line. This prompted Premier to avail itself of the shut-in royalty provision. Each year through 1979 shut-in gas royalties were paid. In 1980 and 1981, however, Carney and Pray refused to accept the shut-in royalty payments.
Carney and Pray filed this quiet title action in June of 1980 on the theory the gas well was not capable of producing in paying quantities because the cost of connecting to the pipeline rendered it unprofitable.
The trial court agreed and ruled in favor of the appellees, holding the lease had expired by its own terms.
This appeal followed.
*353 The sole issue here is whether the cost of connecting a gas well to a pipeline can be used in determining the well's capability of producing in paying quantities.
This case pertains to a typical habendum clause of an oil and gas lease. Under such a habendum clause oil or gas must be produced in "paying quantities" during the primary term, in this case two years, in order to perpetuate the lease. Although the phrase "in paying quantities" does not specifically appear in oil and gas leases, it is implicitly a part of the habendum clause. Texaco, Inc. v. Fox, 228 Kan. 589, 592, 618 P.2d 844 (1980); Wrestler v. Colt, 7 Kan. App.2d 553, 555, 644 P.2d 1342 (1982). Thus, the presence of oil or gas producing in "paying quantities" within the primary term is a condition precedent to the perpetuation of the lease.
Problems inherent in the production of gas impose additional burdens on the lessee. Frequently, the lessee discovers gas in paying quantities, but because of no pipeline in the vicinity has no market and is unable to produce the gas. If no market is available by the end of the primary term a strict application of the habendum clause would terminate the lease for lack of production. This problem has its origin in the physical characteristics of natural gas. Unlike oil, gas cannot be economically stored above ground or transported by truck. Pipeline facilities are required to deliver gas to market. See 4 Kuntz, Law of Oil & Gas § 46.1 (1972), and 2 Summers, Oil & Gas § 299 (rev. ed. 1959). As a remedy gas leases include a "shut-in" royalty clause. This enables the lessee, under appropriate circumstances, to keep a nonproducing lease in force by the payment of shut-in royalties. Absent the shut-in royalty provision venture capital to explore for gas in new areas, known as wildcatting, would not be available. The future supply of gas is dependent upon this risky and expensive business.
Even though the construction of a shut-in royalty clause depends on the specific terms of the lease in question, certain general characteristics of shut-in royalty clauses should be noted.
First, such clauses actually modify the lease's habendum clause to provide for a type of "constructive production." Davis v. Laster, 242 La. 735, 756-57, 138 So.2d 558 (1962). As such they become an integral part of the habendum clause of an oil and gas lease. See 4 Kuntz, Law of Oil & Gas § 46.6(b) (1972).
*354 Second, although initially devised to prevent a lessee from having to forfeit his lease at the end of the primary term, the shut-in royalty clause actually works for the benefit of both lessor and lessee. In Miller v. Nordan-Lawton Oil and Gas Corp. of Texas, 403 F.2d 946, 948 (5th Cir.1968), Judge Griffin Bell stated:
"Shut-in or in lieu royalties were devised to benefit both the lessor and lessee from the standpoint of insuring exploration for and the production of minerals in paying quantities so that both parties may reap the expected benefits. A clause embracing such a provision is for the purpose of protecting the lessor where there are wells capable of producing in paying quantities but where no market can be found for such production."
Similarly, the fact the lease is held by payment of shut-in gas royalties does not excuse the lessee from his duty to diligently search for a market and to otherwise conduct himself as would a reasonable and prudent lessee under the same or similar circumstances. Indeed, the implied covenant to reasonably develop the leasehold is applicable. Masterson, The Shut-in Royalty Clause in an Oil and Gas Lease, 4 Rocky Mtn. Min. L. Inst. 315, 330 (1958). Here, however, the complaint against the lessee is not for breach of these provisions. In fact, the evidence indicates the lessee diligently searched for a market.
Finally, although the shut-in royalty clause does not normally specify the shut-in gas well must be capable of producing in paying quantities, such a requirement is implied. As noted, the shut-in royalty clause is a savings clause allowing for constructive production. Such clauses provide that upon payment of the shut-in royalty it will be considered gas is being produced within the meaning of the habendum clause. In order to achieve the desired result, namely a profit, production, whether actual or constructive, must be in paying quantities. 4 Kuntz, Law of Oil & Gas § 46.4(e) (1972).
This court has had many chances to examine the phrase "paying quantities" within the meaning of the standard habendum clause of an oil and gas lease. Most recently, in Texaco, Inc. v. Fox, 228 Kan. at 592, the court held the term was synonymous with "commercial quantities" as found in the thereafter clause of the mineral reservation in a real estate deed. Later, quoting Reese Enterprises, Inc. v. Lawson, 220 Kan. 300, Syl. ¶ 3, 553 P.2d 885 (1976), the court specifically defined "paying quantities":

*355 "`It is generally accepted that the phrase "in paying quantities" in the "thereafter" provision (extension clause) of an oil and gas lease's habendum clause means production of quantities of oil and gas sufficient to yield a profit to the lessee over operating expenses, even though the drilling costs, or equipping costs, are never recovered, and even though the undertaking as a whole may thus result in a loss to the lessee.'" 228 Kan. at 593.
In Reese the court recognized there were two possible constructions of the term "paying quantities." The first is used when determining whether there has been a breach of express or implied covenants to develop. In that situation, the court said, "paying quantities" means oil or gas has to be found in such quantities "that an ordinarily prudent person, experienced in the business of oil or gas production, would, taking into consideration the surrounding conditions, expect a reasonable profit over and above the entire cost of drilling, equipping and operating the well or wells drilled." 220 Kan. at 312.
On the other hand, where "paying quantities" is used in the habendum clause to express a condition upon which the lease might continue, the definition quoted in the Texaco case is used. In that situation "paying quantities"
"refers to operations of the lease after drilling has been accomplished during the primary term and production has been established. From the standpoint of grammatical construction of the lease and from the standpoint of the purpose of the habendum clause, the cost of drilling and preparing a well for production, and the ultimate profit to be expected from any particular well, are not taken into account in determining whether or not the lease is producing in paying quantities.
....
"Expenses which are taken into account in determining `paying quantities' include current costs of operations in producing and marketing the oil or gas. Most of the costs so incurred are easily identified as being direct costs, and present no difficulty. In this connection the lessee is held accountable for the production of the lease as a prudent operator working for the common advantage of both the lessor and the lessee. All direct costs encountered, whether paid or accrued, in operating the lease as a prudent operator are taken into account. These direct costs include labor, trucking, transportation expense, replacement and repair of equipment, taxes, license and permit fees, operator's time on the lease, maintenance and repair of roads, entrances and gates, and expenses encountered in complying with state laws which require the plugging of abandoned wells and prevention of pollution." 220 Kan. at 312-15.
Here the trial court applied the test set out in Reese and held the lease in question terminated by its own terms. He reasoned:

*356 "10. In order to market the gas from this well, Defendants would have to spend additional money for surface equipment, constructing a pipeline to the market and installing a compressor thereon and would incur additional expenses for operating the well, the cost of which would exceed the gross revenues that could be received from selling all of the recoverable gas located under said Lease. (Testimony of Messrs. Watson, Robinson and Myers).
"11. Since the cost of operating this Lease and marketing the gas exceed the gross revenues from the sale of said gas, said well is not capable of producing gas in commercial quantities and the Lease cannot be perpetuated by the payment of shut-in gas royalties."
The real bone of contention is whether the cost of building a pipeline to transport the gas from Pray No. 1 should be included in considering whether the well is capable of producing in paying quantities. Appellees' expert witness, R. Douglas Myers, testified it would cost approximately $80,000 per mile to lay a three-inch pipeline from Pray No. 1 to the nearest market, which is a Getty Oil pipeline three miles away. He also testified the cost of compression equipment on this pipeline would be approximately $118,000.
Appellants' expert, Dale Robinson, offered another opinion. He testified that considering only normal operating expenses the annual working interest profit on Pray No. 1 would be approximately $134,000.00 per year, almost twenty-five times that of a marginal well. Indeed Mr. Myers and appellees' counsel both agreed if normal operating expenses were taken into account the well would produce in commercial quantities. However, if the costs of transporting the gas from Pray No. 1 to the nearest market are figured against the lessee the well is not capable of producing in paying quantities.
Was it proper for the trial court to include the cost of transporting the gas to the nearest market in determining whether the well was capable of producing in paying quantities? We think not. First, it is contrary to normal procedure. Mr. L.A. Watson, a witness for both parties, testified that 85% of the time the purchaser of the gas brings the transportation line to the well.
Further, the trial court's holding essentially negates the effectiveness of the shut-in royalty clause included in this lease. Involved here is precisely the type of situation contemplated by the clause  a well capable of producing a profit is drilled but for the time being no market exists. This is much different from cases such as Reese where no shut-in royalty clause is involved and a determination of production in paying quantities can be *357 made simply by looking at the performance of the well. See also Kahm v. Arkansas River Gas Co., 122 Kan. 786, 253 Pac. 563 (1927). A case such as the one at bar, on the other hand, necessarily involves some speculation. This speculation should not include the cost of taking the gas to market when the parties have foreseen in the lease the possibility a market might not exist.
We hold capital expenditures for building a pipeline are improper considerations for determining whether a gas well will produce in paying quantities under a shut-in royalty clause. Pipeline costs fall in the same category as costs of drilling and equipping a well and according to Reese should not be taken into account in making such a determination.
The judgment of the trial court is reversed.
