
670 A.2d 1245 (1996)
David and Vivian BOLAND
v.
TOWN OF TIVERTON et al.
No. 93-683-Appeal.
Supreme Court of Rhode Island.
February 9, 1996.
*1246 David M. Campbell, Providence, for Plaintiff.
Marc DeSisto, Michael T. Sullivan, Providence, for Defendants.

OPINION
BOURCIER, Justice.
This matter comes before us on appeal from a Superior Court order granting the town of Tiverton's motion for summary judgment.
The plaintiffs, David and Vivian Boland (the Bolands), built what they expected to be their dream house in the town of Tiverton. As will be revealed, that expectation turned out to be a bad dream. In December 1988, as the Bolands' house neared completion, they requested that the town building inspector inspect their house for the purpose of issuing a certificate of occupancy. Wilford Eccles (Eccles), the Tiverton building inspector, visited the house and during a thirty-minute inspection examined every room, with the exception of a downstairs room that was occupied. Eccles found that the house construction had not been fully completed. He observed unfinished construction work that included an uncompleted rear deck, unfinished front stairs, and unattached electric wires hanging in the basement. Nevertheless, Eccles issued a certificate of occupancy.
After moving into the house, the Bolands noticed what appeared to be several violations of the town's building code and made a list detailing the violations. They then requested Eccles to perform a second inspection, which he did in July 1989. During that second inspection, Eccles noticed for the first time that an additional beam was needed in the basement alongside the fireplace, a double box needed to be placed around the fireplace hearth, and plywood used in constructing the fireplace had to be removed. All these deficiencies, which he had earlier overlooked, constituted building code violations. Eccles notified the contractor, the Marks *1247 Group, as well as the Bolands, about the violations that he had found, but took no further official action concerning the validity or the sufficiency of the certificate of occupancy that he had previously issued. The Bolands, not satisfied with Eccles's performance, went to the Tiverton Town Council for help.
The council, at the Bolands' request, arranged for an additional inspection by the state building commissioner, Joseph A. Cirrillo. He noted the earlier defects and also found several additional building code violations. Similarly, an architect retained by the Bolands, Wilbur E. Yoder, inspected the house, and he found further additional building code violations. According to the Bolands, the town council had conferred with Eccles prior to making arrangements for the home inspection by the state building commissioner so as to alert Eccles that the Bolands were still not satisfied with the condition of their home after Eccles's second inspection. Eccles was also made aware of the later construction defect findings observed by the state building commissioner and the Bolands' architect.
The Marks Group, despite repeated requests to do so by the Bolands, refused to repair any of the alleged building code violations. The Bolands, therefore, withheld payment for the construction work. That decision resulted in the Marks Group filing suit in the Newport County Superior Court to recover payment due for the house construction. The Bolands filed a counterclaim for damages, alleging defective and incomplete construction. The case was assigned to binding arbitration in 1991. In the course of the arbitration proceedings, Eccles sent a letter to the arbitrator in which he affirmed the findings of his original inspection of the Boland residence. The arbitrator found against the Marks Group and in favor of the Bolands on their counterclaim and awarded them $56,000 for defective and incomplete work. Unfortunately, the Marks Group then filed for bankruptcy and no money was ever recovered by the Bolands. Their dream home had become their nightmare.
Their zeal for satisfaction undiminished by the Marks Group's bankruptcy, the Bolands then filed suit against the town of Tiverton and Nancy Mello, in her capacity as its town treasurer, alleging negligent performance of the building inspections by the town's building inspector. In their action, the Bolands claimed that because the town and the building inspector were acutely aware of the defects and unfinished work in the plaintiffs' home, the town owed them a special duty of care with regard to the issuance of its certificate of occupancy that would then trigger the builder's right to final construction payment. As a consequence, the Bolands asserted in their action that the general public duty doctrine, which normally shields the state or its municipalities from liability for negligent acts, is not applicable to them. The Bolands claim that the town on the particular facts in their case acted egregiously and, as a consequence, is not shielded by the general public no liability duty doctrine.
At the hearing in the Superior Court, the town moved for summary judgment, contending that there was no proximate cause connecting the town building inspector's alleged negligence to the damages alleged by the Bolands. If the plaintiffs can prove at trial that but for the building inspector's issuance of the certificate of occupancy, payments would not have been made to the contractor, sufficient proximate cause for their loss will be established. Although the motion calendar justice did question the existence of proximate cause between the building inspector's alleged negligence and the damages claimed by the Bolands, as well as the egregious conduct exception to the applicability of the public duty doctrine, she never specified upon which theory she relied in granting the town's motion for summary judgment. In their appeal from that decision, the Bolands claim that they were foreclosed in their attempt to establish the factual existence of their asserted exception to the general public no liability duty doctrine.

I

The Public Duty Doctrine
"[T]he activities and the inspection that are required to ensure compliance with the state building code cannot be engaged *1248 in by private enterprise." Quality Court Condominium Ass'n. v. Quality Hill Development Corp., 641 A.2d 746, 750 (R.I. 1994). Any damages caused by the alleged negligence of a municipal building inspector during the performance of his or her employment, therefore, qualifies for the tort immunity provided by the general public duty doctrine. That immunity exists because "[t]he public duty doctrine shields the state and its political subdivisions from tort liability arising out of discretionary governmental actions that by their nature are not ordinarily performed by private persons." Haley v. Town of Lincoln, 611 A.2d 845, 849 (R.I. 1992). The purpose of that doctrine is to "encourage the effective administration of governmental operations by removing the threat of potential litigation." Id. (quoting Catone v. Medberry, 555 A.2d 328, 333 (R.I. 1989)). However, notwithstanding that general tort immunity, liability will attach if it can be determined in a particular setting that the state or its subdivision owed a special duty to a plaintiff. The existence of that special duty can be established when a plaintiff has had prior contact with state or municipal officials who then knowingly embark on a course of conduct that endangers the plaintiffs, or when a plaintiff has "otherwise specifically come within the knowledge of the officials so that the injury to that particularly identified plaintiff can be or should have been foreseen." Knudsen v. Hall, 490 A.2d 976, 978 (R.I. 1985). Such liability will indeed encourage proper governmental responsibility.
A second exception to the public duty doctrine's general tort immunity is the egregious conduct exception. That exception provides that when "the state has knowledge that it has created a circumstance that forces an individual into a position of peril and subsequently chooses not to remedy the situation," the state can then be held liable for its negligence. Houle v. Galloway School Lines, Inc., 643 A.2d 822, 826 (R.I. 1994) (quoting Verity v. Danti, 585 A.2d 65, 67 (R.I. 1991)). Absent the applicability, in this case, of either of those two exceptions to the general public duty doctrine, Eccles and the town of Tiverton would of course be immune from liability for any of the Bolands' damages.

II

The Summary Judgment
"When deciding a motion for summary judgment, the trial justice must keep in mind that it `is a drastic remedy and should be cautiously applied.'" Rustigian v. Celona, 478 A.2d 187, 189 (R.I. 1984) (quoting Ardente v. Horan, 117 R.I. 254, 256-57, 366 A.2d 162, 164 (1976)). Moreover, "the trial justice must look for factual issues, not determine them." Steinberg v. State, 427 A.2d 338, 340 (R.I. 1981). "[T]he justice's only function is to determine whether there are any issues involving material facts." Id. "When a genuine issue of fact exists * * * the trial justice must not decide the issue. The court should simply ascertain the existence of the factual issue and deny the motion for summary judgment." Rustigian, 478 A.2d at 189-90. This court, when reviewing the grant of a summary judgment order, employs the same standard of review as is used by the trial justice. Our review includes an examination of the pleadings and case affidavits, all "viewed in a light most favorable to the party opposing the motion." Id. at 190 (citing Steinberg, 427 A.2d at 340).
The circumstances in the particular case before us are factually similar to the circumstances that existed in Quality Court. See also Resmini v. Kilduff Builders, 661 A.2d 964 (R.I. 1995). Quality Court, however, was decided subsequent to the Superior Court's grant in this case of the town of Tiverton's summary judgment motion. In Quality Court this court affirmed the trial justice's denial of a motion for directed verdict, holding that a special duty existed between a city and the owners of the particular condominium unit. The record in that case demonstrated clearly that the city had been specifically made aware of construction defects in the condominium unit both through the unit owners' complaints as well as through meetings held with the state building inspector, the architect of the condominium, and a representative of the Attorney *1249 General's office. The city inspector in Quality Court had confirmed his earlier issuance of a certificate of occupancy despite his having specific knowledge of the irregularities and construction defects in the condominium unit. On the basis of those facts, this court found that the condominium owners did come within the particularized knowledge of the city, thereby creating the city's special duty to the condominium owners. The breach of that duty, we held, was an issue upon which reasonable minds could differ, and accordingly, we affirmed the trial court's denial of the city's motion for a directed verdict. In the instant case, similar facts are present. The Tiverton building inspector here, also confirmed his earlier issuance of a certificate of occupancy notwithstanding his prior knowledge of the construction defects in the Boland house.
This court notes that the record before us contains sufficient facts that, if more fully developed at trial, as in Quality Court, could probably support a finding of either a special duty owed to the Bolands or egregious conduct by the town. Eccles admitted at his deposition that when he inspected the Bolands' house for the first time in 1988, he noticed several construction irregularities that could have justified his denial of the certificate of occupancy. The front steps had not been finished, there were loose electrical wires hanging from the basement ceiling, and the rear deck had not been completed. Additionally, Eccles, when later asked to reinspect the house in 1989, performed a second inspection, during which he found additional code violations that he thought were serious enough to mention to the contractor and to the Bolands. These additional construction defects included a missing support beam, a missing double box around the fireplace, and the failure of the contractor to remove plywood from underneath the fireplace. At no time, however, did the Town's building inspector ever alter his earlier decision to issue the certificate of occupancy. As a result, the Bolands had to personally bear the cost of repairing the house to meet required compliance with the town's building code.
Although there appear to be insufficient facts in the record, in its current state, for this court to determine whether the town did, in fact, owe the Bolands a special duty or whether the town acted egregiously, the Bolands have stated sufficient facts in their pleadings and discovery materials that could probably lead to such a finding. At trial, those facts could be fully examined and determined. The proximate cause issue between the town's alleged negligence and the damages the Bolands seek, as well as the fair and reasonable cost of repairs to the house so as to bring it into compliance with the town building code should be determined at trial after full presentation of the facts. Those issues of fact should not have been decided on the motion for summary judgment. See Regnier v. Cahill, 618 A.2d 1266 (R.I. 1993); Rustigian v. Celona, 478 A.2d 187 (R.I. 1984). We understand that, when making her decision in this case, the trial justice did not have available to her the benefit of Quality Court, supra, and its discussion of the relationship between the enforcement of the building code and the liability of municipalities for the negligence of its building inspectors. The trial justice, however, erred in granting the defendants' motion for summary judgment without permitting the full development of factual evidence from which could be established, as a matter of law, the applicability or nonapplicability of the public duty doctrine or any of its exceptions.
The plaintiffs' appeal is sustained. The order granting summary judgment is vacated. The case is remanded to the Superior Court for further proceedings consistent with Quality Court and this opinion.
