
669 A.2d 1320 (1996)
NORTHERN SECURITY INSURANCE COMPANY, INC.
v.
Sandra DOLLEY, et al.
Supreme Judicial Court of Maine.
Argued November 3, 1995.
Decided January 3, 1996.
*1321 Michael K. Martin (orally), Petruccelli & Martin, Portland, for Plaintiff.
Paul Sumberg, Wright & Mills, P.A., Skowhegan, Donald E. Eames (orally), Eames & Stearns, Skowhegan, for Defendants.
Before WATHEN, C.J., and ROBERTS, GLASSMAN, CLIFFORD, RUDMAN, DANA and LIPEZ, JJ.
WATHEN, Chief Justice.
Plaintiff Northern Security Insurance Company, Inc. (NSIC) appeals from a judgment entered in the Superior Court (Kennebec County, Atwood, J.) declaring that NSIC has a duty to defend and indemnify its insureds, defendants Sandra and Barry Dolley, in a personal injury action brought against them by defendant Anita McClintick. NSIC argues on appeal that the Superior Court erred: (1) in considering a prior adjudication before the Workers' Compensation Commission, (2) in considering evidence outside the parties' stipulations, and (3) in concluding that McClintick's injury did not occur in the course of her employment. We affirm the judgment with respect to NSIC's duty to defend, but vacate with respect to the duty to indemnify.
The relevant facts may be briefly summarized as follows: McClintick, an employee at a nursing home owned and operated by the Dolleys, was injured on their property. She filed a petition for an award of workers' compensation, but the Workers' Compensation Commission denied her claim, ruling that the injury did not "arise out of and in the course of" her employment. NSIC, the general liability insurer of the Dolleys, was not a party to the Commission's hearing. McClintick then sought compensation directly from the Dolleys, who in turn sought indemnification from NSIC.
From this point onward, the procedure employed by the parties adds an unnecessary degree of complexity. Without waiting for McClintick to file a civil complaint against the Dolleys, NSIC brought this action, seeking a declaration that McClintick's injury was excluded by the terms of the general liability insurance policy issued to the Dolleys. That policy provides as follows:
This insurance does not apply:
. . . .
(i) to any obligation for which the insured or any carrier as his insurer may be held liable under any workmen's compensation, unemployment compensation or disability benefits law, or under any similar law:
(j) to bodily injury to any employee of the insured arising out of and in the course of his employment by the insured or to any obligation of the insured to indemnify another because of damages arising out of such injury, but this exclusion does not apply to liability assumed by the insured under an incidental contract;
. . . .
All three partiesNSIC, McClintick, and the Dolleysagreed to submit the case to the Superior Court for decision on trial briefs and stipulated facts, without a full trial. The statement of stipulated facts is as follows:
1. Anita McClintick began working as a PCA (personal care attendant) for the employer in October, 1991. Anita McClintick was born on January 18, 1947.
2. Anita McClintick worked the 11:00 p.m. to 7:00 a.m. shift and was expected to be at the employer's facility by 10:50 p.m. to receive the reports of the personal care attendants and certified nurses assistants who had worked the previous shift.
3. Mrs. Sandra Dolley, administrator, informed all employees, including Anita McClintick, at a staff meeting held on July 16, 1992 [held approximately one week prior to the date of injury] that employees were not to report to work more than ten minutes before their shift began for the purpose of performing their duties.
4. On Friday, July 17, 1992, Anita McClintick reported to [for] work at 7:00 p.m. to instruct another employee on the use of a carpet shampoo machine at the request of the employer. Anita McClintick returned home after completing that task.

*1322 5. Anita McClintick returned to 234 Madison Avenue between 10:00 p.m. and 10:15 p.m. on Friday, July 17, 1992. Anita McClintick was not required [to report] to work until 10:50 p.m. [Anita McClintick used that time to meet with employees on the 3:00 p.m. to 11:00 p.m. shift.]
6. At approximately 10:40 p.m., Anita McClintick, after exiting from a restroom on the first floor, walked across a carpet which had been shampooed earlier that evening. When her feet stepped from the wet carpet onto a tile floor, her feet slipped out from under her. Anita McClintick was taken immediately to Redington-Fairview General Hospital where X-rays revealed a fracture of the proximal right humerus.[1]
The Superior Court considered the stipulated facts, but also made its own additional findings based on depositions submitted to the court during discovery. The court ruled that exclusion (i) does not apply to McClintick's injury, because the Commission had already ruled that her injury was not covered under the Workers' Compensation Act. The court stated that "the application of this policy exclusion is determined solely on the applicability of the [Act] to these facts which, in turn, can only be decided by the [Commission]." The court also ruled that although the injury clearly "arose out of" McClintick's employment, it did not occur "in the course of" her employment, and therefore exclusion (j) does not apply. In so ruling, the court concluded that the time of McClintick's arrival at the worksite, rather than the time of her injury, was determinative. Her arrival "nearly an hour early . . . in violation of a straightforward, reasonable policy against such early arrivals . . . for her own purposes" was unreasonable. The court concluded that NSIC has a duty to "defend and indemnify [the Dolleys] against a complaint brought against them by Anita McClintick for injuries she may have suffered at their place of business. . . on July 17, 1992."[2] This appeal followed.

I. Duty to Defend
Whether an insurer has a duty to defend its insured against a complaint brought by a third person is a question of law. The answer is arrived at by comparing the allegations in the complaint with the terms of the insurance contract. L. Ray Packing Co. v. Commercial Union Insurance Co., 469 A.2d 832, 834 (Me.1983). If the general allegations in the complaint could give rise to any set of facts that would establish coverage, then the insurer has a duty to defend. Merrimack Mutual Fire Insurance Co. v. Brennan, 534 A.2d 353, 354 (Me.1987), citing American Policyholders' Insurance Co. v. Cumberland Cold Storage Co., 373 A.2d 247, 249 (Me.1977).
When purchasing a general liability policy, a purchaser obtains protection from the costs of defending any lawsuit that could fall within coverage offered by the policy, and protection from being required to pay the damages for any acts that fall within the terms of the policy. These two types of protection are not coextensive. The group of actions for which there is a duty to indemnify is merely a subset of the larger sphere of actions for which there is a duty to defend. See State Mutual Insurance Co. v. Bragg, 589 A.2d 35, 36 (Me.1991) ("the duty to defend is broader than the duty to indemnify"), citing Merrimack, 534 A.2d at 354.
Except in limited circumstances,[3] we have held that an insurer cannot avoid its duty to defend by establishing, before the underlying action has concluded, that ultimately there will be no duty to indemnify. In determining the duty to defend, regardless *1323 of when that ruling is made, the court's consideration is limited to the underlying complaint and the insurance policy. Cumberland Cold Storage, 373 A.2d at 249. Even when evidence could conclusively establish the absence of a duty to indemnify, ordinarily that evidence is irrelevant to the determination of the duty to defend. See Horace Mann Insurance Co. v. Maine Teachers Association, 449 A.2d 358, 360-61 (Me.1982) (holding that facts established in underlying administrative adjudication could not be considered in determining whether there was initially a duty to defend).
Given the unusual procedural posture of this case, we are required either to reject the declaratory judgment on the basis of ripeness or to proceed to determine what McClintick's complaint might have alleged, had it been filed. Because the parties have stipulated the facts, we take the latter course in the interest of judicial economy. McClintick's complaint need not have stated more than the general time and place of her injury, and an allegation that the injury was proximately caused by the Dolleys' failure to maintain safe premises. Such a complaint, when compared with the insurance contract, unmistakably gives rise to a duty to defend the action.

II. Duty to Indemnify
We have previously stated that if courts conclude that an insurer owes its insured the duty to defend an underlying action, it should defer ruling on indemnity. Facts may come out in the course of the action that are material to the issue. Bragg, 589 A.2d at 36; Cumberland Cold Storage, 373 A.2d at 250-51. Here, however, all parties have stipulated to the facts. The parties are bound by their stipulation, and the stipulated facts will control the trial of the underlying liability action. Accordingly, the trial court did not overstep in ruling on the indemnity issue. It did, however, err as a matter of law in concluding that the injury did not occur "in the course of employment."

a. Res Judicata Effect of the Prior Commission Finding
The Superior Court first erred in relying on the finding by the Workers' Compensation Commission that McClintick's injury did not arise out of and in the course of her employment. "It is a violation of due process for a judgment to be binding on a litigant who was not a party or a privy and therefore has never had an opportunity to be heard." Parklane Hosiery Co., Inc. v. Shore, 439 U.S. 322, 327 n. 7, 99 S.Ct. 645, 649-50 n. 7, 58 L.Ed.2d 552 (1979), citing Blonder-Tongue Laboratories, Inc. v. University of Illinois Foundation, 402 U.S. 313, 329, 91 S.Ct. 1434, 1443, 28 L.Ed.2d 788 (1971). NSIC was not a party to the Commission proceeding. Neither was NSIC in privity with the Dolleys: privity requires a "commonality of interest" in proving or disproving the same fact or legal issue. Department of Human Services v. Richardson, 621 A.2d 855, 856 (Me.1993). The interests of the Dolleys and of NSIC were not aligned during the Commission hearing, nor are they now. As a secondary insurer of the Dolleys, it will always be in NSIC's interest to secure a finding that the injury is covered by workers' compensation, because such a finding would relieve it from any duty to indemnify. The Dolleys took the position before the Commission that the injury was not covered by workers' compensation, a position directly contrary to the interests of NSIC. The Commission's order does not bind NSIC.

b. Consideration of Evidence Beyond the Stipulated Facts
The Superior Court also erred in considering any evidence beyond the facts stipulated by the parties. When the parties' stipulations include exhibits and transcripts of depositions, the court may "properly draw appropriate inferences from those materials." Judkins Insurance Agency, Inc. v. Whitney, 588 A.2d 298, 299 (Me.1991). Here, however, the stipulation made no reference to depositions and the court erred in going beyond the stipulated facts. "The justice to whom a case is submitted upon an agreed statement cannot properly add to or subtract from the facts thus agreed upon but must apply the applicable law to that which is presented to him." Public Finance Corp. v. Scribner, 159 Me. 150, 189 A.2d 368, 368-369 (Me.1963), quoted in Mearl v. State Tax Assessor, 482 *1324 A.2d 1258, 1260 (Me.1984). Accord, Pelletier v. Dwyer 334 A.2d 867, 871-872 (Me.1975) ("when the parties choose to rely on an agreed statement of facts, . . . the court cannot assume or infer a fact not agreed upon by the parties.") (citations omitted).

c. Course of Employment
Although this case involves the interpretation of an insurance contract, the words in the contract are borrowed from the workers' compensation laws, and we turn to case law in that area for guidance.
"The words `in the course of employment' relate to time, place and circumstances under which the accident takes place. An accident arises in the course of employment when it occurs within the period of employment at a place where the employee reasonably may be in the performance of his duties and while he is fulfilling those duties or engaged in doing something incidental thereto."
Fournier's Case, 120 Me. 236, 240, 113 A. 270 (1921).
The term covers a reasonable time before and after the employee's shift:
"`[T]he course of . . . employment' does not begin and end with the actual work [an employee] was employed to do, but covers the period between . . . entering his employer's premises a reasonable time before beginning his actual work and leaving the premises within a reasonable time after his day's work is done and during the usual lunch hour, he being in any place where he may reasonably be in connection with his duties or entering or leaving the premises by any way he may reasonably select."
Robert's Case, 124 Me. 129, 131, 126 A. 573 (1924).
Contrary to the view of the Superior Court, we conclude that the relevant time period is the time of the employee's injury, not the time of the employee's arrival. McClintick was injured, while exiting the washroom, ten minutes before her shift was to begin. This conduct was not so unreasonable as to fall outside the sphere of employment. As a matter of law her injury arose out of and in the course of her employment, and therefore exclusion (j) applies. Because proof of the applicability of one exclusion is sufficient to bar any duty to indemnify, we need not consider whether exclusion (i) is also applicable.
The entry is:
That portion of the Superior Court judgment relating to the duty to defend is affirmed. That portion of the judgment relating to the duty of indemnify is vacated and remanded for a declaration that NSIC has no duty to indemnify.
All concurring.
NOTES
[1]  Although the facts submitted by the parties are nearly identical, the words appearing in brackets were submitted solely by NSIC.
[2]  McClintick filed suit against the Dolleys after the Superior Court's order. The complaint is not part of the record in this case.
[3]  For example, prior criminal convictions for murder, attempted murder and sexual abuse of a child preclude any litigation over the issue of the tortfeasor's intent and therefore there is no duty to defend or indemnify where the policy excludes intentional torts. See Bragg, 589 A.2d at 38. The insurer may also seek a declaratory judgment of no duty to defend or indemnify where the insurer contests coverage based on "nonpayment of a premium, cancellation of a policy, failure to cooperate or lack of timely notice." Cumberland Cold Storage, 373 A.2d at 250.
