
513 A.2d 283 (1986)
STATE FARM MUTUAL AUTOMOBILE INSURANCE COMPANY,
v.
UNIVERSAL UNDERWRITERS INSURANCE COMPANY.
Supreme Judicial Court of Maine.
Argued June 3, 1986.
Decided August 1, 1986.
Pierce, Atwood, Scribner, Allen, Smith & Lancaster, Jotham D. Pierce, Jr. (orally), Elizabeth McCandless, Portland, for plaintiff.
Thompson, McNaboe & Ashley, Edward MacColl (orally), Portland, for defendant.
Before McKUSICK, C.J., and NICHOLS, ROBERTS, VIOLETTE, GLASSMAN and SCOLNIK, JJ.
*284 VIOLETTE, Justice.
The defendant, Universal Underwriters Insurance Co., (Universal) appeals from part of a summary judgment granted in favor of plaintiff, State Farm Automobile Insurance Company (State Farm) rendered in Superior Court, Androscoggin County. On appeal it asserts that the Superior Court erred: 1) in its application of 29 M.R.S.A. § 831, a compulsory insurance statute, and 2) in apportioning legal fees between State Farm and Universal. We affirm the judgment.

I. Facts and Procedure

This suit was originally brought as a negligence action arising out of an automobile accident. Lois Lefebvre, the members of her family and her car were insured by State Farm. In February, 1980, Lois left her car in the shop for repairs and on March 3, 1980 she leased a Datsun from Lee Oldsmobile-Cadillac (Lee Oldsmobile). On March 22, 1980 Lois lent the car to James Gardner, a 16 year old licensed driver and a friend of her son, Victor. Later in the evening James and Victor picked up another friend, Gary McKeon. Thereafter, James allowed Victor to operate the car. Victor, who was only 15 years old and unlicensed, drove off the road. Gary McKeon was injured in the accident and he and his parents filed suit against Victor for negligence.
Lois and Victor were covered under a policy issued by State Farm because the Datsun was a "temporary substitute automobile" within the meaning of the State Farm policy. The Datsun was also covered under a policy issued by Universal on which Lee Oldsmobile was the named insured and which covered persons operating the car with Lee Oldsmobile's permission.
State Farm provided the defense of the suit against Victor, and Universal refused to defend. On June 17, 1983 State Farm filed a complaint for declaratory judgment seeking to determine its responsibilities for McKeon's personal injuries, defense costs and Lee Oldsmobile's property damage. On July 8, 1983 Universal answered and also counterclaimed for declaratory relief. On October 4, 1984 the underlying suit between the McKeons and Victor was settled for $25,000. State Farm and Universal each contributed one-half of the settlement amount, but agreed to proceed on the declaratory judgment action.
After settlement both Universal and State Farm amended their pleadings and each sought to redistribute the cost of the settlement in accordance with the obligations under their policies and under 29 M.R.S.A. § 831 (1978), (Section 831), a compulsory insurance statute concerning insurance for vehicles for hire. Both Universal and State Farm agreed to proceed on cross motions for summary judgment on an agreed record. On November 8, 1985, the Superior Court granted in part and denied in part Universal's motion for summary judgment. In its decision the lower court found that State Farm was obligated as a primary insurer to extend coverage to Victor under the terms of the insurance policy. The Court also found that the terms of Universal's policy did not afford coverage to Victor because Lee Oldsmobile did not give express or implied permission for a 15-year old, unlicensed driver to operate the car and Lois Lefebvre, at the time she signed the rental contract, was deemed to be aware of the terms of the policy that forbade such operation. The Court, however, found that 29 M.R.S.A. § 831, as a compulsory insurance statute, required Universal to extend coverage to Victor regardless of the terms of the policy. The Court also found that the statute triggered the duty to defend contained in Universal's policy and thus required apportionment of the total liability loss and the legal costs of defending the suit. The court apportioned these costs according to the pro rata sharing clauses in the respective insurance policies that required prorating equally to the limits of the lowest policy. It determined that State Farm was responsible for five-ninths of the cost of liability loss and legal fees and that Universal was responsible for *285 four-ninths of the cost of liability loss and legal fees.

II. Application of 29 M.R.S.A. § 831 (1978)

On appeal Universal contends that the lower court erred in construing Section 831 to require Universal to extend coverage to Victor. 29 M.R.S.A. § 831 provides:
Insurance for Vehicles for Hire
The Secretary of State shall not register any motor vehicle rented or leased on plans commonly known as U-Drive, Drive Yourself or Driverless Car plans nor any motor vehicle used for livery or hire, except as provided in Title 35, section 1510, or as a school bus, and no person, firm or corporation shall operate or cause to be operated upon any public highway in this State any such motor vehicle, until the owner or owners thereof shall have procured insurance or a bond, having a surety company authorized to transact business in this State or 2 individuals as sureties thereon, in the amount of $20,000 because of bodily injury or death to any one person, and subject to said limit respecting one person, in the amount of $40,000 because of bodily injury to or death of 2 or more persons in any one accident, and in the amount of $10,000 because of injury to and destruction of property in any one accident, which insurance or bond shall be approved by the Secretary of State and shall indemnify the insured against any legal liability for personal injury, the death of any person or property damage, which injury, death or damage may result from or have been caused by the operation of the motor vehicle described in the contract of insurance or such bond. The Secretary of State shall not approve the policy or bond unless it provides primary coverage for the operator as well as the owner.
The thrust of Section 831 is that: 1) no leasing company permit operation of an uninsured leased vehicle, 2) that the insurance a leasing company is obligated to provide must indemnify the insured against damage resulting from operation of the vehicle, and 3) that the insurance procured provide primary coverage for the operator as well as the owner. The obvious purpose of Section 831 is to protect both the public and the operators of leased vehicles.
When provisions of an insurance policy conflict with mandatory statutory provisions, the statutory provisions must prevail. Concord General Mutual Insurance Co. v. McLain, 270 A.2d 362, 364 (Me.1970). In Wescott v. Allstate Ins., 397 A.2d 156, 166 (Me.1979), we enunciated the well recognized principle that automobile liability insurance policies are:
presumed to incorporate all relevant mandatory provisions of the statutes under which it was made, as existing statutes governing the subject matter of a contract must under normal circumstances be read as a constituent part thereof. Our Court further ruled ... that mandatory statutory provisions control, even when not included in the insurance contract, and, to the extent that policy terms are repugnant to the express or implied requirements of the statute, they are void and unenforceable.
Id. (citations omitted).
We recognize that McLain dealt with the Financial Responsibility Law that expressly required an insurer to certify compliance and that Wescott involved mandatory provisions of uninsured motorist coverage. We decide that an insurer's awareness that its policy is to be used for compliance with Section 831 provides a sufficient basis for treating the provisions of Section 831 as mandatory. Indeed, Universal concedes that this principle controls but argues that the word "operator" in the statute was erroneously construed by the lower court to mean any operator. It is Universal's position that the legislature did not intend to include an operator such as Victor who was unauthorized and whose operation was unlawful because he was only 15 years old and unlicensed. Instead, Universal maintains that "the operator" must be construed *286 to mean the person or persons whom the owner or lessee intended to operate the vehicle. We disagree.
The best manner in which to ascertain the legislative intent of a statute is to examine the wording of that statute. Id. at 166. Only when a statute is ambiguous are we required to construe the meanings of the words contained within it. Id. Here the meaning of the statute is clear. Contained within the general provision section of M.R.S.A., Title 29, is a definition of the word "operator" which applies to all the statutory provisions found within that title. 29 M.R.S.A. § 1(8-A) (1978) provides that: "`Operator' shall mean every person who drives or is in actual physical control of a motor vehicle upon a highway or who is exercising control over or steering a vehicle being towed by a motor vehicle." Id. (emphasis supplied).
The word "operator" in this statute is used without limitation. There is nothing in the statute that allows insurance companies or their insureds to limit coverage to certain operators of leased vehicles. Thus, the plain meaning of the statute requires that there be primary coverage for any operator of vehicles rented by Lee Oldsmobile in the amounts of $20,000 for bodily injury or death to one person and $10,000 for property damage.
We determine, therefore, that the Superior Court did not err in finding that Universal was obligated by operation of law to primarily insure Victor to the limits required by 29 M.R.S.A. § 831.

III. Apportionment of Legal Fees

Universal further contends that the Superior Court erred in apportioning legal fees between State Farm and Universal. It argues that neither Section 831 nor Universal's policy gave rise to a duty to defend. Universal argues alternatively, that if such a duty does exist, State Farm has no right to contribution because State Farm had a distinct duty to defend Victor.
The Superior Court found that even though Section 831 does not refer to a duty to defend, Universal has a duty to defend provided for in its policy. In determining that a duty to defend existed in these circumstances, the lower court relied upon Concord General Mutual Ins. Co. v. McLain, 270 A.2d 362, 366 (Me.1970). In McLain we found that the relevant insurance policy, in purporting to limit coverage to non-owned vehicles, did not meet the requirements of the mandatory financial responsibility law, 29 M.R.S.A. § 781 et seq. (1969), and was, therefore, invalid. We held that the statute required not only the extension of coverage by operation of law but also the duty to defend. McLain, 270 A.2d at 366. The same reasoning applies in the instant case. Written into Universal's policy is a requirement that it defend insureds to whom it offers primary coverage. Under the provisions of Section 831, Universal was required to extend primary coverage. Thus, once coverage under Universal's policy was triggered by the application of Section 831, so too was the duty to defend. The duty to defend exists if there is any legal or factual basis "which could be developed at trial that would obligate an insurer under the policy." American Policyholders' Ins. Co. v. Kyes, 483 A.2d 337, 339 (Me.1984). The application of Section 831 provides a legal basis that obligated Universal under its policy to defend Victor.
The lower court correctly determined that the escape clause contained in Universal's policy was ineffective in view of Section 831's requirement of primary coverage. It further correctly determined that State Farm's escape clause was void and unenforceable. The court thus found that coverage under both policies was primary and accordingly it prorated the liability loss and legal fees. In so doing it compared the pro rata clauses of both State Farm's and Universal's policies and determined that both clauses required the same apportionment. For personal injury, State Farm's limit was $25,000 and Universal's was $20,000 pursuant to Section 831. The lower court prorated the loss equally up to the *287 limits of the lower policy and found that State Farm should bear five-ninths of the cost of settlement and legal fees and that Universal should bear four-ninths of the cost of settlement and legal fees.
In Carriers Ins. Co. v. Am. Policyholders' Ins. Co., 404 A.2d 216, 221 (Me. 1979), we found that once two insurance policies are considered primary by virtue of ineffective escape clauses, then it is appropriate to prorate loss equally up to the limits of the lower policy. The apportionment of loss is grounded in the premise that "on equitable principles the loss should be shared among the insurers ..." Id. Although the reasoning in Carriers does not specifically address the question of contribution of costs of defending the suit, the same equitable principles apply. If prorating the loss equally up to the limits of the lower policy "is an equitable basis for prorating damage liability, it provides like justification for a similar proration of suit expenses." General Acc. F. & L. Assur. Corp. v. Continental Cas. Co., 287 F.2d 464, 467 (9th Cir.1961). Where two insurers cover the same risk, it is appropriate that legal fees "also be shared between them pro rata in proportion to the respective coverage afforded by them to the insured." Continental v. Morgan, Olmstead, Kennedy & Gardner, Inc., 83 Cal.App.3d 593, 608, 148 Cal.Rptr. 57 (1978); American Home Assurance Company v. Hartford Insurance Company, 74 A.D.2d 224, 427 N.Y.S.2d 26, 29 (N.Y.1980).
The entry is:
Judgment affirmed.
All concurring.
