
249 S.C. 120 (1967)
153 S.E.2d 124
HARTFORD ACCIDENT & INDEMNITY COMPANY, Appellant,
v.
The SOUTH CAROLINA INSURANCE COMPANY, Respondent.
18605
Supreme Court of South Carolina.
February 14, 1967.
*121 Messrs. Donald v. Richlardson, III, and Whaley & McCutchen, of Columbia, for Appellant.
Joseph L. Nettles, Esq., of Columbia, for Respondent.
February 14, 1967.
LEWIS, Justice:
This is an appeal by the plaintiff from an order of the lower court sustaining a demurrer to the complaint for insufficiency of facts to state a cause of action.
Both plaintiff and defendant had in force automobile liability insurance policies which under the particular facts, covered the same insured. Apparently the policy of defendant afforded primary and that of plaintiff excess coverage. This action was brought by plaintiff, the alleged excess insurer, against the defendant, the alleged primary insurer, to recover costs, expenses, interest and attorney's fees incurred in defense of an action against the insured after the *122 defendant had agreed to pay the limits of its policy and withdrew from further defense of the claim. It was alleged that, as a result of the withdrawal of the defendant from the defense of the action within about thirty days before the trial and its failure to continue the defense, plaintiff "was forced to defend said action under adverse conditions which resulted in a verdict" in excess of the primary coverage, requiring the payment by plaintiff of attorney's fees, costs, expenses, and interest, all to its damage in the sum of $6,000.00, for which judgment was sought.
A demurer was interposed to the complaint, and sustained, upon the grounds that
(1) no facts were alleged which showed any duty on the part of the defendant to defend, on behalf of the plaintiff, the action against the insured after the limits of defendant's policy had been exhausted; and
(2) it appeared that the payments made or incurred by plaintiff in the defense of the claim against the insured were made in discharge of plaintiff's obligation to the insured under its own policy and were not the responsibility of the defendant.
Among other grounds of appeal, the plaintiff contends that the court erred in determining the issues raised by the demurrer by considering matters not contained in the complaint.
The issues presented by the demurrer concerned the rights of the parties arising out of their respective obligations to defend the action against the insured. These rights and obligations, arose under the policies issued by them. While the complaint alleges in general terms the provisions of defendant's policy relating to its obligation to defend claims against the insured, the pertinent portions of plaintiff's policy are not set forth and neither policy is made a part of the complaint or this record. However, in passing on the demurrer, the lower court went beyond the allegations of the complaint and based its order to a large extent *123 upon what it determined to be the provisions of both policies of insurance.
It is of course elementary that in passing on a demurrer the court is restricted to the facts as they appear in the pleadings. Fleming v. Pioneer Life Insurance Co., 178 S.C. 226, 182 S.C. 154.
It is apparent that in deciding the issues the lower court considered facts not set forth in the complaint, which was error. The questions attempted to be raised by the demurrer can be properly determined only after the facts have been fully developed. For these reasons, the order sustaining the demurrer is reversed.
Reversed.
MOSS, C.J., BUSSEY, J., and GEORGE T. GREGORY, JR., and LIONEL K. LEGGE, Acting JJ., concur.
