
125 Ariz. 267 (1980)
609 P.2d 82
NEWMONT EXPLORATION LIMITED, a Delaware Corporation, and Magma Copper Company, a Delaware Corporation, Plaintiffs/Appellees,
v.
SISKON CORPORATION, a Delaware Corporation, Defendant/Appellant.
No. 2 CA-CIV 3354.
Court of Appeals of Arizona, Division 2.
January 23, 1980.
Twitty, Sievwright & Mills by Howard A. Twitty, Phoenix, for plaintiffs/appellees.
Verity, Smith & Clark, P.C. by Leo N. Smith, Tucson, for defendant/appellant.
OPINION
HATHAWAY, Chief Judge.
This appeal arises from the trial court's granting of appellees' motion for summary judgment and denial of appellant's cross-motion for summary judgment.
*268 The sole issue is the proper interpretation of the provisions of an option and royalty agreement covering various mining claims located in the Bunker Hill Mining District, Pinal County.
The parties to the agreement were appellant Siskon Corporation, owner of the mining claims (Siskon), and appellees Newmont Exploration Limited and Magma Copper Company (Newmont/Magma), purchasers of the claims.
The portions of the agreement relevant to the issue before us are as follows:
"WHEREAS, Siskon warrants that it is the owner of the mineral claims and other property situate in Pinal County, Arizona, all more particularly described in the annexed Exhibit A, free and clear of any and all claims and encumbrances whatsoever save as shown in said Exhibit A, together with all rights, privileges and appurtenances pertaining hereto or connected therewith, including all water and water rights, rights of way and easements appurtenant to or held, owned, developed or used in connection therewith, both recorded and unrecorded, all hereinafter sometimes referred to as the `Property'; and....
* * * * * *
4. Title ...
d) If it shall appear that in the location of any of the unpatented claims included within the Property, such locations were made so that the unpatented claims do not constitute a contiguous body of claims without interior gaps and that one or more of such claims can be amended so as to eliminate such interior gaps, then Newmont and Magma, in the name of and as agent for Siskon, may amend any of the locations of such claims for that purpose, and the parties hereto agree to execute any further documents necessary to enable Newmont and Magma so to do. If it shall appear that the location of any of the unpatented mining claims included with the Property as originally located, or as such locations may be amended, are such that there are present a fractional area or areas unlocated, then Newmont and Magma, in the name of and as agent for Siskon, may locate such fractional areas as mining claims, and the parties hereto agree to execute any further documents to enable Newmont and Magma so to do and all such amended or new locations shall be deemed to be part of the property....
5. Royalty ...
e) The production royalty payments shall be computed on ores mined by Newmont and Magma only from within planes projected vertically downward through the exterior boundary lines of the mining claims described in Parcels One and Three of Exhibit `A'.
* * * * * *
15. New Mining Locations

In the event that any mining claim or claims, other than those named and described herein, are presently owned by Siskon or any officer thereof, or in the event that any mining claim or claims are located by or for Siskon, or for H.B. Chessher, Sr., Jane E. Chessher, and or H.B. Chessher, Jr., after the date hereof and before Newmont and Magma have paid the full purchase price for the royalty interest as provided in Paragraph 6, the discovery monuments of which are less than one (1) mile from the nearest exterior boundary of the group of claims both patented and unpatented described in Exhibit `A', said claim or claims shall be deemed to be included within the scope of this Option Agreement as though named and described herein, and the title of such claim or claims, if Newmont and Magma make all payments herein set forth, shall be or be deemed to have been acquired by Newmont and Magma, and Siskon covenants and agrees to execute the necessary conveyances by which title thereto shall be transferred to Newmont and Magma in the event that they pay the full purchase price of FIVE HUNDRED THOUSAND DOLLARS ($500,000.00), all without any increase in price in any sum whatsoever."
*269 The parties interpret subparagraph 4(d) and paragraph 15 differently and disagree as to whether the claims covered by those sections of the agreement are included within the scope of paragraph 5 and therefore subject to royalty payments.
Newmont/Magma claims that the interior fractional claims discussed in subparagraph 4(d) and the "boundary" claims covered by paragraph 15 are excluded from those claims subject to royalty payments under the terms of subparagraph 5(e). Newmont/Magma points to the wording of 5(e) which states:
"The production royalty payments shall be computed on ores mined by Newmont and Magma only from within .. . the mining claims described in Parcels One and Three of Exhibit `A'." (Emphasis added)
The trial court agreed with this interpretation of the instrument and granted summary judgment.
The interpretation of an instrument is a question of law. We are not bound by the trial court's interpretation of the agreement. Polk v. Koerner, 111 Ariz. 493, 533 P.2d 660 (1975); Gutmacher v. H & J Construction Company, 101 Ariz. 346, 419 P.2d 525 (1966); McDaniel & Associates v. Merodias Construction Company, Inc., 120 Ariz. 246, 585 P.2d 266 (App. 1978).
The first determination to be made is whether the language of the agreement is ambiguous and subject to more than one construction and whether its meaning can be determined within the four corners of the instrument. McDaniel & Associates v. Merodias Construction Company, Inc., supra; Ranger Insurance Company v. Lamppa, 115 Ariz. 124, 563 P.2d 923 (App. 1977). In addition, the agreement must be reviewed in its entirety and construed as a whole, and the intention of the parties must be collected from the entire agreement and not from detached portions. Kintner v. Wolfe, 102 Ariz. 164, 426 P.2d 798 (1967); Hamberlin v. Townsend, 76 Ariz. 191, 261 P.2d 1003 (1953); Tevis v. Ryan, 13 Ariz. 120, 108 P. 461 (1910), aff'd 233 U.S. 273, 34 S.Ct. 481, 58 L.Ed. 957 (1914).
However, if the agreement is found to be ambiguous and there is the slightest doubt as to whether a factual issue remains in dispute, the granting of summary judgment is erroneous and such doubt must be resolved in favor of a trial on the merits. Hegel v. O'Malley Insurance Company, Inc., 122 Ariz. 52, 593 P.2d 275 (1979); Grain Dealers Mutual Insurance Company v. James, 118 Ariz. 116, 575 P.2d 315 (1978). In addition, even if there is no factual dispute, where possible inferences to be drawn from the circumstances are conflicting, summary judgment is unwarranted. Northern Contracting Company v. Allis-Chalmers Corporation, 117 Ariz. 374, 573 P.2d 65 (1977).
From the record before us, it is apparent that, while both interpretations are reasonable, there is complete disagreement between the parties as to which inferences are properly drawn from the agreement. This fact, coupled with the absence of any indication in the record of which party prepared the agreement, of what the normal custom and usage is in the mining industry regarding royalty payments on claims which are subject to such provisions as paragraph 15, and of what, if any, the course of dealing between these parties was on other occasions, leads us to conclude that the granting of summary judgment was erroneous. Travelers Indemnity Co. v. McIntosh, 112 Cal. App.2d 177, 245 P.2d 1065 (1952).
Reversed and remanded.
HOWARD and RICHMOND, JJ., concur.
