
385 S.E.2d 553 (1989)
INTERNATIONAL PAPER COMPANY
v.
CORPOREX CONSTRUCTORS, INC.
No. 8910SC236.
Court of Appeals of North Carolina.
November 21, 1989.
*554 Patterson, Dilthey, Clay, Cranfill, Sumner & Hartzog by Reid Russell and Kari L. Russwurm, Raleigh, for plaintiff-appellant.
Young, Moore, Henderson & Alvis, P.A. by Walter E. Brock, Jr. and Evelyn M. Coman, Raleigh, for defendant-appellee.
WELLS, Judge.
On 6 April 1983 plaintiff and defendant entered into a contract by which defendant agreed to design and construct the expansion of plaintiff's facility in Raleigh, North Carolina. The contract embodied the full and complete agreement between the parties as to insurance and indemnification in relation to the expansion of the facility. Indemnity provisions appear in two different places in the contract. One indemnity provision appears in Article 9, Section 4 of the agreement which was set out on a form regularly used by International Paper. The other indemnity clause is Article 3.16.1 of the general conditions section which was incorporated into the contract as part of an addendum. The indemnity provisions are not identical; specifically, the clause in Article 9, Section 4 does not cover negligent acts of subcontractors while the clause in Article 3.16.1 does cover the negligent acts of both contractor and any subcontractors hired to work on the project.
Corporex subcontracted the roofing portion of the work to Mid-Western Commercial Roofers, Inc. On 13 October 1983, while performing roofing work at the Raleigh facility, an employee of the subcontractor fell through the roof and was injured. The employee, Douglas Wayne Williams, through his guardian ad litem brought suit against plaintiff, defendant, and others for his personal injuries.
International Paper demanded that Corporex assume the defense of the Williams action against International Paper. Corporex refused. International Paper then employed counsel at its own expense to defend the Williams action. The Williams action against International Paper was eventually dismissed. International Paper subsequently brought this suit against Corporex seeking indemnification for $16,372.85 in attorney's fees it incurred in defending the Williams suit. The parties stipulated, among other things, that Douglas Wayne Williams' damages and injuries were not due to an act of, or the neglect of, International Paper. The parties further stipulated that Williams' damages and injuries were caused in whole or in part by a negligent act or omission of a subcontractor, or by someone directly or indirectly employed by a subcontractor.
Plaintiff assigns as error the trial court's grant of defendant's motion for summary judgment and its denial of plaintiff's summary judgment motion. Plaintiff asserts that the indemnification provision in Article 3.16.1 of the contract allows for the recovery of its attorney's fees. Defendant counters that the provision in Article 3.16.1 is void because it contains a clause which violates N.C.Gen.Stat. § 22B-1 (1986). G.S. § 22B-1 in pertinent part provides as follows:
Any promise or agreement in, or in connection with, a contract or agreement relative to the design, planning, construction, alteration, repair or maintenance of a building, structure, highway, road, appurtenance or appliance, including moving, demolition and excavating connected therewith, purporting to indemnify or hold harmless the promisee, the promisee's independent contractors, agents, employees, or indemnitees against liability for damages arising out of bodily injury to persons or damage to property proximately caused by or resulting from the negligence, in whole or in part, of the promisee, its independent contractors, agents, employees, or indemnitees, is against public policy and is void and unenforceable.
The defendant further argues that because the contract provision in Article 9, Section 4 is clear and unambiguous it establishes as a matter of law that defendant is not obligated to indemnify the plaintiff, including the cost of attorney's fees, for the negligence of subcontractors. In the alternative defendant argues that if both *555 indemnity clauses are valid, then the clause in Article 9, Section 4 takes precedence over the clause in the general conditions. Plaintiff maintains that the offending language is severable and, therefore, the indemnity provision in Article 3.16.1 is valid and controlling on these facts. We first address the issue of severability.
The indemnity provision in Article 3.16.1 of the contract's general conditions section provides as follows:
The Builder shall indemnify and hold harmless the Owner and his agents and employees from and against all claims, losses, and expenses, including attorney's fees arising out of or resulting from the performance of the work, provided that any such claim, damage, loss or expense (1) is attributable to bodily injury, sickness, disease or death, or to injury to or destruction of tangible property (other than the Work itself) including the loss of use resulting therefrom, and (2) is caused in whole or in part by any negligent act or omission of the Builder, any Subcontractor, anyone directly or indirectly employed by any of them or anyone for whose acts any of them may be liable, regardless of whether or not it is caused in part by a party indemnified hereunder.
The last clause of the indemnity provision violates the provisions of G.S. § 22B-1. It is therefore against public policy and is void and unenforceable. This does not end the inquiry, however. When a contract contains a provision which is severable from an illegal provision and is in no way dependent upon the enforcement of the illegal provision for its validity, such a provision may be enforced. Rose v. Vulcan Materials Co., 282 N.C. 643, 194 S.E.2d 521 (1973). Severability may apply to terms within a particular provision as well as to entire contract provisions if the party seeking to enforce the term obtained it in good faith and in accordance with reasonable standards of fair dealing. Restatement (Second) of Contracts § 184 (1981).
The indemnity provisions to which G.S. § 22B-1 apply are those construction indemnity provisions which attempt to hold one party responsible for the negligence of another. The parties in this case have stipulated that Douglas Wayne Williams' damages and injuries were not due to an act of, or the neglect of, International Paper. The statute specifically does not apply to a contract, promise, or agreement in which one agrees to indemnify another "against liability for damages resulting from the sole negligence of the promisor, its agents or employees." (Emphasis added.) G.S. § 22B-1.
Moreover, the offending term in this indemnity provision is not a central feature of the contract or even of the provision. It is easily severed from the provision. The general meaning of the provisionthat Corporex will indemnify International Paper for injury or damage resulting from the negligent acts of Corporex, its subcontractors, and their employeesis not affected. By striking the offending language the Court does not rewrite the contract or substitute its own terms in the provision for those of the parties. We merely sever the portion that is void as against public policy from an otherwise valid indemnity provision.
Defendant correctly points out that this Court has applied G.S. § 22B-1 to an indemnity clause and found the entire provision against public policy, void and unenforceable. Miller Brewing Co. v. Morgan Mechanical Contractors, Inc., 90 N.C.App. 310, 368 S.E.2d 438, disc. rev. denied, 323 N.C. 174, 373 S.E.2d 110 (1988). Miller is factually distinguishable from this case. In Miller the illegality permeated the entire provision making severance impossible. The issue of severance was not before the Miller court. Here, unlike in Miller, severance is possible. Accordingly, Miller does not control on these facts.
The next issue raised by this appeal is whether the two indemnity provisions are in conflict with each other. It is well settled that a contract is construed as a whole. The intention of the parties is gleaned from the entire instrument and not from detached portions. See Robbins v. Trading Post, 253 N.C. 474, 117 S.E.2d 438 (1960). Individual clauses are to be considered in *556 context. All parts of the contract will be given effect if possible. Id. at 477, 117 S.E.2d at 440-41. This Court has long acknowledged that an interpretation which gives a reasonable meaning to all provisions of a contract will be preferred to one which leaves a portion of the writing useless or superfluous. Lowder, Inc. v. Highway Comm., 26 N.C.App. 622, 217 S.E.2d 682, cert. denied, 288 N.C. 393, 218 S.E.2d 467 (1975). The court in Lowder also maintained that contract provisions should not be construed as conflicting unless no other reasonable interpretation is possible. In this case the meaning of each clause is clear. The clause in Article 3.16.1 covers the negligence of subcontractors, the clause in Article 9 does not. The clauses do not mean the same thing; however, they are not necessarily in conflict. It is reasonable to conclude that Article 3.16.1 extends the indemnity coverage of Article 9, Section 4 to include the negligent acts of subcontractors. When the contract is read as a whole, Corporex appears to have agreed to indemnify International Paper from claims arising from the negligence of the general contractor or of any subcontractors.
When a court is asked to interpret a contract its primary purpose is to ascertain the intention of the parties. Lane v. Scarborough, 284 N.C. 407, 200 S.E.2d 622 (1973). A contract that is plain and unambiguous on its face will be interpreted by the court as a matter of law. Id. at 410, 200 S.E.2d at 624. When an agreement is ambiguous and the intention of the parties is unclear, interpretation of the contract is for the jury. Silver v. Board of Transportation, 47 N.C.App. 261, 267 S.E.2d 49 (1980). If the writing leaves it uncertain as to what the agreement was, parol evidence is competent, not to contradict, but to show and make certain what was the real agreement between the parties. Root v. Insurance Co., 272 N.C. 580, 158 S.E.2d 829 (1968).
In this case the existence of two indemnity provisions, each with clearly different scopes of coverage, creates an ambiguity as to the true intention of the parties. Based on the contract language alone we cannot say as a matter of law that defendant had no duty to indemnify plaintiff for the negligence of subcontractors. There is some evidence in the record to indicate that the provision providing indemnity exclusively for the negligent acts of contractors was specifically negotiated by the parties. However, there is no indication in the contract that this provision is to override or negate the other indemnity clause. Ambiguities in contracts are to be resolved by a trier of fact upon consideration of a range of factors including the expressions used, the subject matter, the end in view, the purpose and the situation of the parties. Silver, supra.
A party moving for summary judgment is entitled to such judgment only if he can show that there is no genuine issue of material fact and that he is entitled to judgment as a matter of law. N.C.Gen. Stat. § 1A-1, Rule 56; Hagler v. Hagler, 319 N.C. 287, 354 S.E.2d 228 (1987). Because we hold that the offending clause in Article 3.16.1 was severable, defendant was not entitled to summary judgment. However, this does not resolve the issue of whether the parties intended to extend indemnification to cover the negligent acts of subcontractors. In order to resolve this ambiguity we must remand this case to the superior court for further proceedings.
Reversed and remanded.
JOHNSON and ORR, JJ., concur.
