
257 N.W.2d 791 (1977)
Robert BESS, et al., Respondents,
v.
Harold BOTHMAN, Individually and d.b.a. Harold's Auto Repair, et al., Appellants.
No. 47016.
Supreme Court of Minnesota.
August 12, 1977.
*793 Bell, Stapleton & Nolan and James R. Bell, St. Paul, for appellants.
Axelrod, Cincera, Donohue & Markley, Edward T. Donohue, and David W. Nord, St. Paul, for respondents.
Heard before ROGOSHESKE, TODD, and SCOTT, JJ., and considered and decided by the court en banc.
KELLY, Justice.
Defendant appeals from a judgment entered for plaintiffs in Washington County District Court, enjoining him from conducting a general towing business in Forest Lake for 5 years. We affirm.
This appeal involves interpretation of a contract that provided for the sale of two tow trucks, and for the lease of a portion of a parking lot for a 1-year term. Defendant Harold Bothman had been in the automobile repair business in Forest Lake, Minnesota, since 1958. He expanded his business to include towing services in 1969. In March 1974 he approached plaintiff Delmar Branum to promote the sale of two of his tow trucks. Defendant evidently wished to sell the trucks so that he could take employment with the city of Forest Lake. On April 1, 1974, defendant accepted work as a maintenance supervisor for the city for 1 year and rented his automobile repair business on a month-to-month basis to another individual. Prior to that time, defendant and Branum had negotiated the sale of the trucks. They were good friends and Branum knew that defendant was going to work for the city, but was unaware of his term of employment. Branum had operated a Mobil station and towing service three blocks from defendant's business in Forest Lake since 1966. He was interested in the trucks because they would enable him to provide a more complete towing service, but needed financial assistance to make the acquisition. Branum obtained the needed capital from plaintiff Robert Bess, and they formed a partnership, Forest Lake Towing.
Branum and Bess had possession of defendant's trucks by April 1, 1974, but the parties did not sign a contract until May 10, 1974. At that meeting plaintiffs produced a contract containing the following paragraph:
"III. Covenant Not to Compete

Seller agrees not to hold his remaining tow vehicle out for public service, or to commit any other act detrimental to the successful operation of the business by Buyers. It is agreed that Seller will use his remaining vehicle only to tow vehicles to his place of business for repair purposes and not for towing only, unless prior agreement is obtained from Buyers."
Plaintiffs inserted this paragraph because defendant told them he would not return to the towing trade after he began work for the city. Defendant denied making such a statement and testified that he had said that if things did not work out with the city, he would resume his towing operations. He signed the contract after scanning it and was paid $10,000, including $1,000 for the 1-year leasehold.
Defendant ended his employment with the city on May 1, 1975. He does not dispute that after May 1, 1975, he advertised a general towing service in violation of the covenant if it was in force. The parties agree, however, that defendant retained the right to tow repair work and the right to continue to provide towing services for certain accounts.
*794 Plaintiffs brought suit to enjoin defendant from conducting a general towing business, and to recover damages. They waived recovery of damages at trial. After hearing the evidence, the district court construed the covenant to enjoin defendant from operating a general towing service in the Forest Lake area through May 1, 1979, approximately a 5-year period. From that judgment, defendant appeals and challenges the authority of the court to set these limitations.[1]
The district court concluded that without judicial modification the covenant not to compete was an unreasonable restraint of trade. A party may purchase the goodwill of a business and, to protect his investment, require the seller not to compete with the business sold. But such a restraint of trade is valid only if it is reasonable, and a restraint that provides more protection to the purchaser than is necessary to secure the goodwill he purchased is unreasonable and therefore illegal. National Benefit Co. v. Union Hospital Co., 45 Minn. 272, 47 N.W. 806 (1891); 6A Corbin, Contracts, § 1387. The district court correctly construed the contract as involving the sale of part of the goodwill of defendant's towing business, as evidenced by the covenant not to compete. But the covenant was unbounded by territorial or temporal limitations and, without limitations restricting its prohibition to protection of the goodwill of the towing business sold, the covenant embodies, as the district court found, an illegal restraint of trade. Defendant argues that the court was without authority to supply the limitations necessary to render the restraint reasonable.
No Minnesota case apparently has dealt with the question of partial enforcement of a covenant unreasonably restraining trade. Other courts have adopted one of three approaches:
"Although an unreasonable convenant against competition is not enforceable, it is widely held that such restrictions, usually involving duration or territorial scope, may be modified and enforced within their proper sphere. * * * Courts differ as to the type of restrictions which can be modified, the older view requiring that the restrictions must be divisible in terms, and refusing to consider modification of unreasonable restrictions which do not lend themselves to strict or formal severance. Some recent decisions do not require formal divisibility of the restrictions and enforce unreasonable covenants insofar as they are reasonable. In some other cases, the covenants involved were held completely void, and incapable of modification, the courts in a few of these cases stating as a general rule that unreasonable noncompetitive covenants may not be modified." Annotation, 61 A.L.R.3d 397, 404.
Although the "blue pencil" doctrine, requiring that the reasonable and unreasonable restraints be severable, still commands a slight majority of jurisdictions, a substantial minority of courts modify unreasonable restraints of trade, whether formally divisible or not, and enforce them to the extent reasonable in the circumstances. Annotation, 61 A.L.R. 397, § 4.
Use of a judicial blue pencil would not aid plaintiffs here. But even if it did, we think its logic extends to the minority position. The rationale of the blue pencil doctrine is that a court is merely enforcing the legal parts of a divisible contract rather than making a new contract for the parties. See, 6A Corbin, Contracts, § 1390. But this *795 distinction and the doctrine itself emphasize form over substance. Solari Industries, Inc. v. Malady, 55 N.J. 571, 583, 264 A.2d 53, 57 (1970). No cogent reason appears to limit the partial enforcement of illegal covenants to those that are formally divisible. Moreover, under the minority position, enforcement of restrictive covenants remains a matter of equitable discretion and should be granted only when neither injury to the public interest nor injustice to the parties will result. We join the minority and hold that the district court had authority to modify and enforce the covenant not to compete. It remains to determine whether the limits established by the court were reasonable in these circumstances.
Three elements of reasonableness gauge the validity of territorial and temporal restrictions in this situation: First, whether the restriction exceeds the protection necessary to secure the goodwill purchased; second, whether the restriction places an undue hardship on the covenantor; and third, whether the restriction has a deleterious effect on the interests of the general public. Annotation, 45 A.L.R.2d 77 (temporal restrictions); Annotation, 46 A.L. R.2d 119 (territorial restrictions); 14 Williston, Contracts, § 1636, p. 92 (W. Jaeger 3d ed. 1972). See, e. g., Haynes v. Monson, 301 Minn. 327, 330, 224 N.W.2d 482, 483 (1974); Southworth v. Davison, 106 Minn. 119, 121, 118 N.W. 363 (1908).
Defendant essentially concedes the reasonableness of restricting the covenant's effect to the Forest Lake area. Although no evidence of the market for towing services in the area was introduced, restriction of defendant's activity within the city would seem necessary in order to protect the goodwill plaintiffs purchased. Nor would this restriction cause defendant undue hardship. The covenant permitted him to tow work in connection with his repair business; it prohibited only general towing services. The covenant also would not seem to subject the public to monopoly or other injury since other towing operations were present in the city.
The 5-year limitation is amenable to the same analysis. But as to it, defendant argues that the parties intended the 1-year term of the leasehold to be the term of the restrictive covenant as well. See, e. g., Ceresia v. Mitchell, 242 S.W.2d 359 (Ky. 1951). Although this period was the only one raised by the evidence, the district court did not clearly err in finding that the parties did not link the covenant not to compete with the term of the leasehold. Plaintiffs are entitled to a restriction of sufficient duration so that defendant's reentry into the field would not for that reason alone draw customers whose patronage plaintiffs had acquired. 6A Corbin, Contracts, § 1391, p. 79. The 5-year period represents a reasonable balance between protection of plaintiffs' goodwill and avoidance of undue hardship to defendant. As such, it will not be overturned on appeal. Prior cases which hold that a covenant with a proper territorial limitation may be valid even absent an explicit temporal restriction reinforce this result.[2]
Affirmed.
NOTES
[1]  Defendant also challenges the validity of the covenant not to compete on other grounds. First, he argues that he acceded to the covenant under duress. We find no evidence indicating that defendant's will was not his own when he signed the contract. E. g., Wise v. Midtown Motors, Inc., 231 Minn. 46, 42 N.W.2d 404 (1950). Second, defendant contends that no consideration supported the covenant, that the contract was completed earlier orally and that no additional consideration was given. The district court could have found, however, that the signing was contemporaneous with and a part of the transaction and that the $10,000 therefore supported the covenant as well. Peoples Cleaning & Dyeing Co., Inc. v. Share, 168 Minn. 474, 210 N.W. 397 (1926). Plaintiff Branum testified that plaintiffs were interested not in the trucks so much as the towing business.
[2]  Holliston v. Ernston, 124 Minn. 49, 144 N.W. 415 (1913) (covenant prohibited defendants from operating bus line in Granite Falls; construed to remain in force during life of covenantors); Southworth v. Davison, 106 Minn. 119, 118 N.W. 363 (1908) (covenant prohibited defendants from operating a laundry within five miles of Northfield; order overruling demurrer to complaint affirmed). Accord, Peterson v. Johnson Nut Co., 204 Minn. 300, 314, 283 N.W. 561, 570 (1939) (defendant covenanted not to compete in territory where plaintiff was granted exclusive right to use certain patents by a contract of sale of a business; held reasonable). These cases implicitly, if not explicitly, nevertheless require a covenant of unspecified duration to be a reasonable restraint of trade in the circumstances. See, also, Williams v. Thomson, 143 Minn. 454, 174 N.W. 307 (1919) (10-year, one-county restriction ancillary to sale of garage business held reasonable).
