
775 So.2d 373 (2000)
HEWETT-KIER CONSTRUCTION, INC., a Florida corporation, Appellant,
v.
LEMUEL RAMOS AND ASSOCIATES, INC., a Florida corporation, and Alberto Marin, an individual, Appellees.
No. 4D00-420.
District Court of Appeal of Florida, Fourth District.
November 22, 2000.
Rehearing Denied January 19, 2001.
*374 Larry R. Leiby and Michael E. Stearns of Leiby Taylor Stearns Linkhorst and Roberts, P.A., Fort Lauderdale, for appellant.
G. Kenneth Norrie and F. Eugene Atwood of Rogers, Towers, Bailey, Jones & Gay, Jacksonville, for appellees.
POLEN, J.
Hewett-Kier Construction, Inc. ("Hewett-Kier"), a general contractor, appeals from a final order dismissing its complaint for professional malpractice against appellees, Lemuel Ramos and Associates, Inc. ("LRA"), an architectural firm, and Alberto Marin, LRA's architect employee, with prejudice. It argues that the trial court erred by finding that appellees, who worked on the same construction project, did not owe it a duty to prevent economic injury, even though there was no contract between the parties. It also argues the trial court erred by relying upon matters outside the four corners of the complaint. We agree with both points and, thus, reverse.
This dispute arose from a construction project known as the Lincoln Elementary School Replacement, Project Number XXXX-XXXX. Hewett-Kier entered into a contract, as the successful bidder, with the School District of Palm Beach County ("School Board") wherein Hewett-Kier agreed to construct the project in accordance with plans and specifications ("design documents") prepared by Marin, a licensed architect employee of LRA. Marin had prepared the design documents on behalf of LRA pursuant to a contract between LRA and the School Board. ("design contract") There was no contract between Hewett-Kier and LRA.
Hewett-Kier subsequently filed a complaint against appellees alleging that they violated the duty of care owed by a professional architect in the preparation of the design documents and administration of the project. Specifically, it alleged that it suffered economic losses from defects, omissions, and lack of specificity in the design documents. It also alleged that LRA knew the School Board would supply the design documents to the successful bidder, and that the successful bidder would be injured if they were inadequate. It, however, did not attach the design contract to the complaint.
Appellees thereafter moved to dismiss the complaint, attaching the design contract to their motion. They argued that the complaint failed to establish that they owed a duty to Hewett-Kier by virtue of economic loss rule. They also argued that the complaint failed to establish the existence of the supervisory project architect exception to the economic loss rule for negligence actions brought by a project general contractor.
Following a hearing on the motion, the trial court dismissed the complaint with prejudice. It found that neither Hewett-Kier's nor LRA's contract with the School Board created a privity or special relationship between Hewett-Kier and LRA. It also found that design contract established the duties owed by LRA on the project, and that, based on the design contract, *375 LRA was not a supervisory architect on the project. Because LRA was not a supervisory architect and Hewett-Kier only asserted economic injury, the trial court, citing to A.R. Moyer, Inc. v. Graham, 285 So.2d 397, 402 (Fla.1973), determined that Hewett-Kier could not allege that LRA owed it a duty to prevent the types of purely economic injury it asserts it incurred as a result of LRA's alleged conduct. This timely appeal followed.
Hewett-Kier argues that it asserted a valid cause of action in negligence. We agree. "Florida recognizes a common law cause of action against professionals based on their acts of negligence despite the lack of a direct contract between the professional and the aggrieved party." Moransais v. Heathman, 744 So.2d 973, 983 (Fla.1999). Further, the economic loss rule does not bar this type of action for purely economic losses where a special relationship, under section 552 of the Restatement (Second) of Torts (1976),[1] exists between the professional and the third party who is affected by the professional's negligent acts. Id. at 982-83. Here, Hewett-Kier alleged that LRA prepared erroneous design documents with the knowledge that the School Board would supply them to the successful bidder, and that the successful bidder would be injured if they were inadequate. We conclude these allegations were sufficient to establish a special relationship between the parties. See First Florida Bank, N.A. v. Max Mitchell & Co., 558 So.2d 9 (Fla.1990)(holding an accountant may be liable for the negligent preparation of a financial statement by third parties who the accountant knew would rely on the statement).
Appellees argue, however, that the design contract did not create a special relationship between the parties. This argument is misplaced. The allegations of the complaint for purposes of a motion to dismiss must be taken as true and, on the basis of those allegations, Hewett-Kier sufficiently pled that a special relationship existed. If appellees believe the design contract proves otherwise, they should plead the same by way of affirmative defense. See Jowanowitch v. Florida Power & Light Co., 277 So.2d 799, 800 (Fla. 4th DCA 1973).
In this respect, we hold the trial court erred by relying on the design contract in ruling on the motion to dismiss. "[A] court may not properly go beyond the four corners of the complaint in testing the legal sufficiency of the allegations set forth therein." Reed v. Sampson, 349 So.2d 684, 685 (Fla. 4th DCA 1977). In this vein, "[w]here a motion to dismiss a complaint rests on facts outside the scope of the allegations contained in the complaint, the trial court commits reversible error in dismissing the complaint based on those extraneous matters." Id. Here, Hewett-Kier did not sue on the design contract and, therefore, was not required to attach it to the complaint. The trial court, however, in ruling on the motion to dismiss, explicitly relied upon the design contract which was only attached to the motion to dismiss. Because the trial court improperly went beyond the four corners of the *376 complaint, we must reverse. See Baycon Indus., Inc. v. Shea, 714 So.2d 1094, 1095 (Fla. 2d DCA 1998)(reversing the dismissal of appellant's complaint where the trial court improperly went outside the four corners of the complaint by considering documents attached to the motion to dismiss).
REVERSED.
STEVENSON and TAYLOR, JJ., concur.
NOTES
[1]  Section 552 reads in pertinent part:

(1) One who, in the course of his business, profession or employment, or in any other transaction in which he has a pecuniary interest, supplies false information for the guidance of others in their business transactions, is subject to liability for pecuniary loss caused to them by their justifiable reliance on the information, if he fails to exercise reasonable care or competence in obtaining or communicating the information.
(2) Except as stated in Subsection (3), the liability stated in Subsection (1) is limited to loss suffered
(a) by the person or one of a limited group of persons for whose benefit and guidance he intends to supply the information or knows that the recipient intends to supply it; and
(b) through reliance upon it in a transaction that he intends to influence or knows that the recipient so intends or in a substantially similar transaction.
Restatement (Second) of Torts § 552 (1976).
