Plaintiff Michigan Educational Employees Mutual Insurance Company (meemic) appeals as of right the declaratory judgment entered by the trial court that defendant Transamerica Insurance Corporation had no duty to defend Jack Perry or to reimburse meemic for any portion of the costs of his defense. We reverse.
Trevor Chalfant was seriously injured when an automobile in which he was riding left the road. Either Michael Hinkle or Jack Perry was driving the car; each claims the other was driving. Meemic had issued an insurance policy to the car’s owner *442that covered either driver with $100,000 of liability insurance. Transamerica had issued an insurance policy that covered Perry with $250,000 in liability insurance. Under the terms of the policies, meemic provided primary coverage and Transamerica provided excess coverage.
The Chalfants brought an action against the Hinkles and Perry. Meemic hired separate attorneys to defend the Hinkles and Perry. It then brought this action, seeking, in pertinent part, a declaration that Transamerica had a duty to defend Perry and so had a duty to share with meemic the costs of Perry’s defense. The trial court declared that, as long as meemic had a duty to defend Perry, Transamerica had no duty to defend him and that Transamerica had no duty to share in the costs of Perry’s defense.
On appeal, meemic contends that the trial court erred in ruling that Transamerica had no duty to defend Perry. We agree.
Under the terms of meemic’s policy, it is clear that meemic had a duty to defend Perry:
Meemic will defend any suit with lawyers of its choice or settle any claim for these damages as thought appropriate by meemic.
However, Transamerica’s policy states:
1. As respects such insurance as is afforded by the other terms of this Policy . . . [Transamerica] shall:
A. Defend in his name and behalf any suit ágainst the Insured arising from any alleged claim for bodily injury ....
Such a duty to defend arises as soon as the pleadings or other facts known by the insurer bring the action within the policy coverage. See Celina Mu*443tual Ins Co v Citizens Ins Co, 133 Mich App 655, 662; 349 NW2d 547 (1984).
Although the record is not exactly clear with regard to when Transamerica’s duty to defend Perry arose, it is manifest that Transamerica had a duty to defend Perry by the time the declaratory judgment action was filed, because by then it was clear that there was more than $100,000 at stake. We reverse the trial court’s declaratory judgment insofar as it stated that Transamerica had no duty to defend Perry.
Next, meemic argues that the trial court also erred in declaring that Transamerica had no duty to reimburse meemic for the cost of Perry’s defense. Again, we agree.
Transamerica had a contractual duty to defend Perry. Transamerica could have fulfilled its obligation by hiring an attorney to work alongside meemic’s, or Transamerica could have contracted with meemic to share in the costs of Perry’s defense. However, because Transamerica failed to take any action to fulfill its obligation, it breached its duty to defend Perry.
As a third-party beneficiary, Perry would have a right to bring an action against Transamerica for this breach of contract. See MCL 600.1405; MSA 27A.1405. Meemic’s policy provides that, in the event of any payment under the policy, it assumes all of Perry’s rights to recover from any other person. We find that, because meemic provided for Perry’s defense, this provision gives meemic the right to sue Transamerica for the breach.
The question remains, what is the appropriate measure of damages? Transamerica would certainly be liable to pay for costs meemic incurred while providing Perry’s defense when Transamer-ica was the only insurer with a duty to defend Perry. In addition, we believe that Transamerica is *444also liable to pay its fair share of defense costs incurred during times when both Transamerica and meemic had a duty to defend Perry. In Celina, supra at 663, this Court decided that an excess insurer in breach of its duty to defend should pay the primary insurer a pro-rata share of the costs of defense based on its ultimate liability. Consequently, we find that meemic has a right to recover from Transamerica all costs of defending Perry during periods when only Transamerica had a duty to defend Perry, and a pro-rata share of the costs as provided in Celina, supra, when both had a duty to defend him.
Reversed.1
A. A. Monton, J., concurred.Meemic did not appeal the declaration of the trial court concerning when its duty to defend Perry would cease, so that portion of the judgment remains unchanged.