
484 P.2d 728 (1971)
94 Idaho 179
Charles Elmer SKAGGS & Florence Angela Skaggs, husband and wife, and C.E. Skaggs Furniture, Inc., an Idaho Corporation, Plaintiffs-Appellants,
v.
Harlan B. JENSEN and Bette J. Jensen, husband and wife, and Sears Roebuck & Co., a corporation, Defendants-Respondents.
No. 10716.
Supreme Court of Idaho.
May 4, 1971.
Goodman, Duff & Chisholm, Rupert, for plaintiffs-appellants.
Church, Church & Snow, Burley, for respondents, Jensen.
Benoit, Benoit & Alexander, Twin Falls, for respondent, Sears Roebuck & Co.
DONALDSON, Justice.
This is an appeal from a summary judgment granted by the district court. There were several claims made by Skaggs (plaintiffs-appellants) against the Jensens and Sears Roebuck & Co. (defendants-respondents). Each claim and the disposition made by the trial court will be discussed separately in order to facilitate an understanding of this controversy.
In 1961 a written leasing agreement was executed between the lessors, hereafter called Jensens, and the lessees, hereafter called Skaggs, for the rental of an appliance store in the Overland Shopping Center located in Burley, Idaho. The unrecorded leasing agreement, inter alia, contained a restrictive provision prohibiting the Jensens from renting space in their shopping center to any other party engaged in the sale of major appliances.[1] In 1962, the Jensens *729 leased a portion of their property to a Montgomery Ward Store which sold appliances and in 1969, the Jensens entered another leasing agreement with Sears Roebuck and Co., which also sold appliances. On January 23, 1970, the Skaggs instituted suit for damages against the Jensens and claimed that: (1) the Jensens rented space to a Montgomery Ward Store in violation of the leasing agreement; (2) that the Jensens rented space to a Sears Store also a violation of the leasing agreement. In addition to the claims for damages, as set forth above, the Skaggs also sought: (3) injunctive relief against Sears Roebuck and Co. for the purpose of restraining Sears from selling appliances and (4) against the Jensens (lessors) in order to restrain them from continuing to rent this space to Sears.
Following the appropriate motions for summary judgment, the district court made the following disposition of the case:
(1) Granted summary judgment in favor of the Jensens with respect to their rental to Montgomery Ward, since the statute of limitations had run on the Skaggs' claim;[2]
(2) Denied Skaggs' (lessees') motion for summary judgment on the issue of damages for renting space to Sears, and presumably a trial is to be held on this issue;
(3) Granted a summary judgment in favor of Sears Roebuck thus denying Skaggs' claim for injunctive relief against Sears on the basis that Sears was not a party on the covenant between Skaggs (lessee) and Jensen (lessor);
(4) Granted a summary judgment in favor of the Jensens dismissing Skaggs' claim for an injunction preventing the Jensens from renting space to Sears since it would work an injustice on an innocent lessee, viz., Sears.[3]
The Skaggs (lessees) have appealed from the adverse summary judgments and urge that the trial court erred in disposing of their first, third and fourth claims. We disagree with the appellants for the following reasons.
Claim 1 involves damages for the Jensens' rental of space to a Montgomery Ward Store in violation of the leasing agreement. The record indicates that the leasing agreement containing the restrictive provision became operative in 1961. In 1962, the Jensens rented space to Montgomery Ward in violation of the first leasing agreement. Suit was not commenced, however, until 1969. Thus it is evident that more than five years elapsed between the time the cause of action accrued and the time suit was instituted. The Jensens (lessors) were entitled to rely on the statute of limitations as a defense to the Skaggs' (lessees') claim since actions in contract must be brought within five years in this jurisdiction.[4] See also Toellner v. McGinnis, 55 Wash. 430, 104 P. 641 (1909) where the Washington Supreme Court held an action on a lease covenant was barred after six years even though the lease itself was intended to run for fifteen. In view of the length of time that Skaggs rested on their rights, it would be inequitable in this Court's opinion to allow them to now bring suit. By failing to object within a reasonable time after they felt their rights were being violated, they ratified and modified the restrictive provision, thus vitiating its force.
"If the defendant will be damaged or prejudiced in the event that relief is accorded to the complainant, the bill will be dismissed, even though the period during which the complainant delayed the assertion of his claim was less than that specified by the statute of limitations." *730 2 Pomeroy's Equity Jurisprudence, § 419 (d), p. 179, 180. See also Richards v. MacKall, 124 U.S. 183, 8 S.Ct. 437, 31 L.Ed. 396 (1888).
Since the action taken by the trial court with respect to Claim 2 was not considered adverse by the appellants, such disposition is not claimed as error.
Claim 3 involved a suit by the Skaggs (lessees) not against the Jensens (lessors), but rather against Sears Roebuck and Co., for an injunction restraining it from selling appliances. The trial court correctly granted a summary judgment in favor of Sears since Sears had no actual or constructive knowledge of the restrictive covenant in the prior unrecorded lease between Skaggs and Jensens. Deepdale Cleaners, Inc. v. Friedman, 7 A.D.2d 926, 183 N.Y.S.2d 411 (1959). Furthermore Sears expended more than $30,991.42 in preparing the property for doing business and because of this detrimental reliance it would be unfair to issue an injunction at this late date. See Metzger et al. v. Garden-corner, Inc., et al., 233 App.Div. 689, 249 N.Y.S. 409 (1931), motion for leave to appeal to New York Court of Appeals denied, 233 App.Div. 848, 250 N.Y.S. 878 (1931).
Claim 4 involves a request for injunctive relief against Jensen restraining him from renting space to Sears Roebuck. The trial court was correct in its determination not to grant this relief since the granting of this injunction would in effect enforce the covenant against the subsequent lessee, viz., Sears, against whom it is not enforceable. See Annot. 97 A.L.R.2d 4 at 120, § 30, p. 121, ¶ 1.
Judgment affirmed. Costs to respondents, Jensen and Sears Roebuck and Co.
McQUADE, C.J., and McFADDEN, SHEPARD and SPEAR, JJ., concur.
NOTES
[1]  "g. Lessors will not permit or make any other lease in the Overland Shopping Center whereby said other lessees would be permitted to operate a furniture and major appliance store in competition with these Lessees, during the term of this lease, PROVIDED, HOWEVER, that in the event the Lessees should at any time, for any cause whatever, cease to display and/or sell major appliances on said premises, then in that event, the exclusive right, herein given, shall be terminated and void as to said appliances."
[2]  I.C. § 5-216 reads in part as follows:

"Within five years: An action upon any contract, obligation or liability founded upon an instrument in writing. * * *."
[3]  Sears claims to have had no knowledge of the leasing agreement between Skaggs and Jensen.
[4]  See F.N. 2.
