
706 P.2d 107 (1985)
109 Idaho 218
John ALTMAN, dba Snake River Real Estate and Investments, Plaintiff-Respondent,
v.
Bert K. ARNDT and Patricia A. Arndt, husband and wife, Defendants-Appellants.
No. 15545.
Court of Appeals of Idaho.
September 6, 1985.
James G. Reid of Ringert, Clark, Harrington, Reid, Christenson & Kaufman, Boise for defendants-appellants.
*108 Mark D. Stubbs of May, May, Sudweeks, Shindurling & Stubbs, Twin Falls for plaintiff-respondent.
WALTERS, Chief Judge.
This is an appeal from a summary judgment granting a real estate broker a commission resulting from the sale of land. Because we hold that a genuine issue of material fact exists concerning the commission agreement entered into between the sellers of the land and the broker, the summary judgment must be set aside. I.R.C.P. 56(c).
The sellers, Mr. and Mrs. Arndt, listed the property for sale with Mr. Altman, the broker. Subsequently, the land was sold to a buyer who had been produced by the sellers and not by the broker. The broker filed suit for a commission. His complaint alleged that the listing agreement between the parties provided:
[T]hat in the event that the property was sold by the [sellers] or any other person or in the event any exchange or conveyance of the property, or any part thereof, occurred during the term of the contract, or in the event the [sellers] withdrew the authority given prior to the expiration date of the contract, the [sellers] would, nevertheless, pay said commission just the same as if a sale had actually been consummated by the [broker].
After the complaint was filed, the broker applied for a prejudgment writ of attachment. A hearing was held on that application, at which time both the broker and the seller, Mr. Arndt, testified in open court concerning their listing and commission arrangement. The court granted the application. Thereafter the sellers answered the complaint, admitting they had entered into the listing agreement with the broker, but averring:
By oral agreement [the broker and the sellers] modified any written terms of the listing agreement to provide that the [seller] would be allowed to seek buyers for himself and that in the event the [seller] were to sell the property himself he would pay the [broker] any "hard costs" which the [broker] demonstrated it had incurred in marketing the property.
The sellers further "affirmatively state that subsequent to entering into the above referenced listing agreement the [broker] released the [sellers] from any liability arising under the terms and conditions of said agreement."
The broker moved for summary judgment. He filed an affidavit with two exhibits attached. Exhibit A purported to be the listing agreement; Exhibit B purported to be another document signed by the broker and Mr. Arndt. The broker's affidavit also stated:
5. That on or about October 14, 1983, Bert Arndt informed him that he wanted to "take the property off the market" because he wanted to refinance the property.
6. That he agreed to release the property from the listing and provided the agreement attached hereto as Exhibit "B" for Mr. Arndt to sign. That he witnessed Mr. Arndt's signature on Exhibit "B."
7. That he is informed and believes and has heard Mr. Arndt testify in court that on or about October 14th, 1983 Mr. Arndt sold the property to [a buyer].
8. That under the terms of Exhibits "A" and "B," he is entitled to receive a real estate commission for that sale.
The sellers filed a counter-affidavit. In that affidavit, Mr. Arndt said that when the subject property was listed with the broker, the property was owned by Candlelight Investments, a partnership of which Mr. Arndt was a partner. He stated that he contacted the broker, Mr. Altman, and:
4. That as a result of our discussions, Mr. Altman agreed to list the real property which is the subject matter of the Complaint on behalf of Candlelight Investments. However, it was specifically agreed that I, as a general partner of Candlelight Investments, would have the right to attempt to secure a buyer for the property, notwithstanding the provisions of the listing agreement Mr. Altman *109 asked me to sign. In this regard, it was agreed between Mr. Altman and I that if I found a buyer for the property through my own efforts and not as a result of Mr. Altman's contacts, he would release me at any time from the listing agreement if I agreed to pay his "hard costs," which he described to me as costs of advertising and other out-of-pocket expenses.
5. That prior to the 14th day of October, 1982, I contacted a third-party buyer who had been neither recommended to me by Mr. Altman nor contacted by Mr. Altman, and entered into negotiations on behalf of Candlelight Investments for the sale of the property described in the Complaint. As a result of these negotiations, a tentative agreement was reached for the purchase of the property.
6. I then, on October 14, 1982, went to Mr. Altman's office to inform him of the fact that I had found a third-party buyer for the property he was listing; and, pursuant to our original agreement, Mr. Altman, on the 14th of October, 1982, executed a Notice of Withdrawal in which he agreed to release me from the listing agreement if I agreed to pay his hard costs of Six Hundred Fifty Dollars ($650.00).
7. I agreed to pay said hard costs; and, although no demand has ever been made, I stand ready, willing and able to tender to Mr. Altman the Six Hundred Fifty Dollars ($650.00).
8. It was additionally agreed on the 14th day of October, 1982  and Mr. Altman, in his handwriting, so stated  that in the event the sale I was attempting to negotiate fell through, and in the further event that Mr. Altman was able to secure a buyer and a sale consummated, he would then be entitled to his full commission, and I would be allowed a Six Hundred Fifty Dollars ($650.00) credit against said commission.
9. At the time Mr. Altman prepared the release agreement, he was totally aware of the third-party sale I had in progress.
10. As a result of Mr. Altman's execution of the release agreement, I then consummated the sale to a third party in November of 1982.
The document attached as Exhibit B to the broker's affidavit, and also variously referred to in the sellers' affidavit as a "notice of withdrawal" or "release agreement," recites, in pertinent part, as follows:
NOTICE OF WITHDRAWAL
In consideration of your permitting the withdrawal or [sic] my property ... from the exclusive listing given you dated 7-7-82 I hereby agree in accordance with the terms of said listing contract to pay you the regular commission in the event said property is sold to any person during the unexpired term of said contract, or if sold within three months thereafter to any person to whom you or your representative have previously offered it.
... .
It is further agreed that said owner shall pay as consideration for above release the sum of $650.00 representing "hard costs."
Which will be a credit against any fee paid to [Snake River Real Estate & Investments], should they sale [sic] subject property.
The pleadings and affidavits of the parties raised a genuine dispute as to the parties' intent and understanding when they entered into the "Notice of Withdrawal" agreement. At the conclusion of the hearing on the broker's motion for summary judgment, the district court resolved the dispute in favor of the broker. The court relied in part upon the testimony presented earlier upon the broker's application for a prejudgment writ of attachment. In essence, the district court decided this case on its merits, which we believe it should not have done in a summary judgment proceeding.
In light of the pleadings and affidavits of the parties concerning their contractual arrangement, the terms of that contract are ambiguous. Where terms of a contract are ambiguous, their interpretation *110 presents a question of fact, which question ordinarily should not be determined by summary judgment. Moss v. Mid-America Fire and Marine Ins. Co., 103 Idaho 298, 647 P.2d 754 (1982). The divergent positions of the parties, shown by their testimony at the writ of attachment proceeding, was paralleled in the sellers' subsequent answer to the broker's complaint and in the affidavits of the parties submitted in the summary judgment proceeding. Only by weighing that earlier testimony and by perhaps determining credibility of the witnesses could the district court have reached its decision on summary judgment that the broker was entitled to recovery of the commission.
It is well settled that, on summary judgment, the district court is not permitted to weigh the evidence or to resolve controverted factual issues. American Land Title Co. v. Isaak, 105 Idaho 600, 671 P.2d 1063 (1983). Further, if the pleadings, admissions, depositions and affidavits raise any question of credibility of witnesses or weight of the evidence, the motion for summary judgment should be denied. Merrill v. Duffy Reed Construction Co., 82 Idaho 410, 353 P.2d 657 (1960). The parties in this case did not stipulate that the case be decided upon a weighing of the testimony, free from the constraints attendant to motions for summary judgments.
Applying these principles to the instant case, we hold the district court erred in granting summary judgment. The judgment is vacated and the case is remanded for further proceedings. Costs to appellants, Arndt. No attorney fees.
BURNETT and SWANSTROM, JJ., concur.
