
170 N.W.2d 878 (1969)
Lyle G. STUART, Plaintiff and Appellant,
v.
T. L. (Tom) SECREST, Defendant and Respondent.
No. 8534.
Supreme Court of North Dakota.
September 25, 1969.
*879 Greenwood, Swanson & Murtha, Dickinson, for plaintiff and appellant.
Wolf, Glaser & Milhollan, Bismarck, for defendant and respondent.
STRUTZ, Judge, on reassignment.
The plaintiff brings this action against the defendant to recover money claimed to be due on contract. The case was tried to the court without a jury. From a judgment entered for the defendant dismissing the plaintiff's complaint, the plaintiff takes this appeal, demanding trial de novo.
Both parties are attorneys at law, licensed to practice in this State. The plaintiff also was a member of the National Guard, and his unit had been called into active service for a period of one year commencing November 1, 1961. Realizing that he would be absent from his office and law practice for a year, the plaintiff contacted the defendant, who then was practicing law in Carson, and proposed leasing his office to the defendant for the period of his absence. After some preliminary discussion, the following contract was prepared by the plaintiff and executed by both parties:

"AGREEMENT
                    "October 18, 1961
"In consideration of the leasing by Tom Secrest of Lot One (1), Block Thirteen (13), Original Townsite of Hettinger, Adams County, North Dakota, and of consideration of other circumstances concerning said transaction, I, Lyle G. Stuart, do hereby covenant not to practice law within the County of Adams, State of North Dakota, for a period of one year after November 1, 1961.
"In consideration of the foregoing covenant by Lyle G. Stuart, I, Tom Secrest, do hereby covenant and agree to pay to said Lyle G. Stuart the share of all legal and professional business which is turned over to my hands by him as the fees therefor are collected, and I do further agree to pay said Lyle G. Stuart a one-fourth share of all probate fees which I may collect should I be retained as attorney for the administrator or executor of the estates of the following named persons: [The names of fourteen persons are listed.]
"In testimony whereof both parties hereto affix their signatures the day and year first above written.
                        "[Signed]
                        ______________
                        Lyle G. Stuart
                        "[Signed]
                        _____________
                        Tom Secrest"
*880 [Jurat of notary public follows signatures.]
After the execution of this agreement, the defendant moved to Hettinger and took over the plaintiff's practice. The record discloses that he paid a monthly rental of $40 to the plaintiff during the year in which he occupied the plaintiff's office.
When the plaintiff had completed his year in military service, he returned to his office in Hettinger and resumed the practice of law on or about November 1, 1962. Sometime thereafter, two of the persons whose names were listed in the agreement of the parties died, and the defendant was retained by the personal representative in each instance to handle the probate of the estate. The exact dates of death of the parties are not shown, but it is undisputed that both of them died after the plaintiff had returned from military service and had resumed his law practice. The defendant was paid a total of $11,121.38 for his services in conducting the probate of these two estates, and the plaintiff now brings this action for one-fourth of these fees under the terms of the agreement. The defendant admits the execution of the agreement, but contends that he was retained in each of the two estates after the year had expired during which he was in possession of the plaintiff's office, and that the plaintiff therefore was not entitled to any share of such fees.
On this record, the trial court held that the agreement of the parties was indefinite and uncertain as to the time of performance; that the agreement was to be in effect for one year, from November 1, 1961, to November 1, 1962, and that its provisions covered only the fees which might have been paid to the defendant for services in connection with probates which came to him during that year; and that since the two individuals in whose estates the plaintiff claims to have an interest under the contract died after the expiration of the year covered by the agreement and after the return of the plaintiff to his law practice, the fees paid in such estates were not covered by the contract of the parties. The court thereupon ordered the dismissal of the plaintiff's complaint. From the judgment of dismissal, the plaintiff takes this appeal.
The agreement of the parties was for a period of one year, beginning on November 1, 1961. It provided that the defendant would pay to the plaintiff
"* * * a one-fourth share of all probate fees which I may collect should I be retained as attorney for the administrator or executor * * *"
of the estates of persons named. No mention is made in the contract whether such retainer had to be within the year covered by the agreement or whether the plaintiff was to be entitled to such fee if the defendant ever was retained in the estates of the named persons. Thus the agreement is ambiguous on this point.
Where a contract is ambiguous, the construction of the contract is the duty of the court. Stetson v. Investors Oil, Inc., 140 N.W.2d 349 (N.D.1966).
In construing this agreement, it is reasonable to assume that the parties intended to cover the period of time while the plaintiff would be out of his office in military service and thus not available to his clients. It would not be presumed that the effect of the agreement was to continue for an indefinite period after the plaintiff had returned from such service and had resumed his practice of law. At the time the plaintiff resumed his practice, both of the parties whose estates thereafter were probated still were living. Had the personal representatives of these parties desired to do so, they could have retained the plaintiff in such proceedings since, at the time such retainer was made, the plaintiff was back in his office and was available. They chose, however, to retain the defendant. Under these circumstances, the plaintiff had no interest in the fees paid to the defendant in such estates, under the contract of the parties.
*881 In construing the terms of a contract, the surrounding circumstances from which it stems must be considered. Delzer Construction Co. v. New Marian Homes Corp., 117 N.W.2d 851 (N.D.1962).
If the contract is ambiguous in any respect, it is proper, in construing its terms, to refer to the circumstances under which it was made and the matters to which it relates. Alm Construction Company v. Vertin, 118 N.W.2d 737 (N.D.1962); Sec. 9-07-12, N.D.C.C.
Applying these principles, we must affirm the judgment of the trial court. The parties entered into their agreement because, for one year, the plaintiff was to be out of his office in the service of his country. During such time, his services would not be available to his clients, and the probate of estates of any of the listed clients was to be covered by the agreement. However, once the plaintiff returned to his practice, the reason for the agreement ceased to exist. The plaintiff then was able to take care of any legal business which his clients chose to submit to him. If, after the return of the plaintiff, any of his former clients chose to retain other counsel, they certainly had the right to do so.
The agreement was drawn by the plaintiff. The ambiguity as to time of performance therefore must be construed most strongly against him. As we said in Shimek v. Vogel, 105 N.W.2d 677 (N.D.1960),
"A contract that is ambiguous should be interpreted most strictly against the party who caused the ambiguity."
This, generally, is a fundamental rule of construction. See 17A C.J.S. Contracts § 324, p. 217; 17 Am.Jur.2d Contracts, Sec. 276, p. 689.
For reasons stated in this opinion, the judgment of the district court is affirmed.
ERICKSTAD, KNUDSON and PAULSON, JJ., concur.
TEIGEN, Chief Justice (dissenting).
I dissent.
I agree the action must be dismissed, however I do not agree it should be dismissed on merits. I believe the provision of the contract interpreted and construed by the majority has no validity under the law. I find the provision in the contract relative to "probate fees" quoted in the majority opinion is unethical as being contrary to Canon 34 (Division of Fees) of the Canons of Professional Ethics governing the conduct of lawyers; that it is against public policy and is offensive to good morals. There is no evidence in the record that the plaintiff rendered any legal services or assumed any responsibility in the probate of the two estates. The contract provision provides for "fee splitting" without the previous consent of the client and without the assumption of a division of service or responsibility. Our statute, Section 9-08-01, N.D.C.C., provides that any provision of a contract is unlawful if it is (1) contrary to an expressed provision of law, (2) contrary to the policy of expressed law, though not expressly prohibited, or (3) contrary to good morals.
It is my opinion that a provision in a contract between two lawyers providing that one lawyer shall pay to the other a one-fourth share of the legal fees collected by the former for the probate of potential estates upon the death of persons named in the contract, if the former is employed as legal counsel in such estates, and which division is not to be based on a division of service or responsibility, is unlawful as being contrary to public policy and good morals and, therefore, should not be enforceable in the courts nor should the courts lend their aid to either of the parties involved in such conduct. An illegal provision of a contract creates no obligation between the parties and cannot form the basis of a judicial proceeding. It is void both at law and in equity. Mees v. Grewer, 63 N.D. 74, 245 N.W. 813.
