
604 P.2d 370 (1979)
93 N.M. 677
Thomas F. YOUNG, Connie Young, Edwin B. Duncan, Camille T. Duncan, William K. Jones, Margaret A. Jones, and 1601 St. Michael's Drive Corporation, Plaintiffs-Appellees,
v.
Bess G. THOMAS, Individually and as Executrix of the Estate of Bradley M. Thomas, Sr., Deceased, Bradley Morris Thomas, Jr. and Virginia Thomas Nydes, Defendants-Appellants.
No. 12275.
Supreme Court of New Mexico.
December 31, 1979.
*371 Johnson & Lanphere, Floyd Wilson, Albuquerque, for defendants-appellants.
Arthur H. Coleman, Albuquerque, for plaintiffs-appellees.

OPINION
EASLEY, Justice.
Young and others (Young) filed a declaratory judgment action against Thomas and others (Thomas) for a declaratory judgment on a real estate lease. Thomas counterclaimed for reformation of the lease because of mutual mistake. The trial court granted summary judgment in favor of Young. We reverse.
We inquire whether the lease is ambiguous so as to permit testimony regarding the intent of the parties, and thereby creating a question of material fact precluding summary judgment.
Thomas, the owner of the land, had a long-term ground lease with the Duncans and the Jones (Duncan/Jones) which contained an agreement that the lease could not be assigned without Thomas' consent and that the rent would be increased upon assignment. Duncan/Jones organized the 1601 St. Michael's Drive Corporation in which they owned all the stock. Thomas agreed to an assignment of the lease from Duncan/Jones to the corporation. A new lease was signed containing the same restriction on assignment and providing for increased rent upon any assignment.
The corporation now proposes to sell all its stock to Young. This suit was brought to determine whether the lease provisions requiring approval by Thomas of the assignment and the increase in rent are applicable.
In relevant part the lease reads:
CORPORATION and DUNCAN/JONES agree that they shall not, henceforth, be permitted to assign, sell or convey all or any part of their interest in and under the aforesaid Ground Lease, without the prior written approval of THOMAS, and it is understood that rentals for the premises the subject of said Ground Lease shall be reset upon the effective date of any such assignment, sale or conveyance ... (Emphasis added.)
Young claims this restriction does not apply to the sale of stock in the corporation, only to the conveyance of an interest in the lease. Duncan/Jones had assigned all of their interest in the lease to the corporation, under another provision in the agreement, and claim that they do not need to obtain Thomas' approval to sell their stock.
Thomas asserts that this restriction prohibits both the corporation and Duncan/Jones from selling or conveying any part of their interest in the lease without his permission. In addition, Thomas claims *372 that if they sell or convey their interest he has the right to increase the rent. The inclusion of "Duncan/Jones" in the restriction is not mere surplusage, Thomas claims. Since the only interest Duncan/Jones has in the lease is their ownership of the stock of the corporation, their sale of the stock must be a sale of their interest in the lease requiring prior written approval of Thomas.
It is not clear from the agreement why "Duncan/Jones" was included in the restriction. If the restriction was not also concerned with the sale of their stock, why were they named? There is no other plausible reason for having included them in the phraseology of the provision. The mere fact that we have to speculate demonstrates the ambiguity of the agreement. Whether an ambiguity exists in an agreement is a matter of law. McDonald v. Journey, 81 N.M. 141, 464 P.2d 560 (Ct.App. 1970). But once this determination has been made, the construction of the agreement depends on extrinsic facts and circumstances, and then the terms of the agreement become questions of fact. Jaeco Pump Co. v. Inject-O-Meter Manufacturing Co., 467 F.2d 317 (10th Cir.1972); see Marchant v. McDonald, 37 N.M. 171, 20 P.2d 276 (1933). When a genuine issue of material fact exists, summary judgment is improper. N.M.R.Civ.P. 56, N.M.S.A. 1978.
The meaning of an agreement is to be determined with reference to the intention of the parties at the time the agreement was made. Keeth Gas Co., Inc. v. Jackson Creek Cattle Co., 91 N.M. 87, 570 P.2d 918 (1977). And the intent of the parties may be ascertained by parol evidence of the language and conduct of the parties, the objects sought to be accomplished by the agreement and the surrounding circumstances at the time of the execution of the agreement. Leonard v. Barnes, 75 N.M. 331, 404 P.2d 292 (1965); Sierra Blanca Sales Co., Inc. v. Newco Industries, Inc., 84 N.M. 524, 505 P.2d 867 (Ct.App. 1972). We remand to the trial court for presentation of such evidence to determine the intent of the parties, and thereby the meaning of the restriction.
The summary judgment awarded Young as to Thomas' counterclaim, seeking reformation of the agreement because of mutual mistake, is also reversed and remanded. Since Thomas claims that there was a mutual mistake concerning the same restriction discussed above, the presentation of evidence concerning the ambiguity will also shed light on whether the ambiguity was the result of mutual mistake.
IT IS SO ORDERED.
FEDERICI, J., and JOE H. GALVAN, District Judge, concur.
