
649 N.E.2d 1334 (1994)
272 Ill.App.3d 168
208 Ill.Dec. 673
The CITY OF ELMHURST ex rel. James M. MASTRINO et al., Plaintiffs-Appellants,
v.
The CITY OF ELMHURST et al., Defendants-Appellees.
No. 2-93-0278.
Appellate Court of Illinois, Second District.
December 2, 1994.
Rehearing Denied June 7, 1995.
*1336 George C. Pontikes, George C. Pontikes & Associates, Chicago, for City of Elmhurst, James M. Mastrino, Eric Van Berschot, Robert Oliver Williams, Jr.
Kenneth T. Kubiesa, Barbara J. Gosselar, Kubiesa, Power & Adams, Ltd., Oakbrook Terrace, for Florence 'Betsy' Aldred, Thomas P. Borchert, City of Elmhurst, Cynthia C. Cronin, Charles H. Garrigues, Phillip D. Jordan, Phillip D. Jordan, Carol L. Josefowicz, Edward Moran, Donald F. Olson, Norman T. Reinertsen, Larry Schoenbeck, Janice A. Vanek, Gerald 'Jerry' Wolin.
Justice QUETSCH delivered the opinion of the court:
Plaintiffs, the City of Elmhurst ex rel. James M. Mastrino, Robert Oliver Williams, Jr., and Eric Van Berschot, brought this action in the circuit court of Du Page County as taxpayers of the City of Elmhurst (Elmhurst) seeking a declaratory judgment invalidating resolutions approved by the Elmhurst city council which authorized Elmhurst to provide for the defense of two Elmhurst aldermen in a libel lawsuit. Plaintiffs also sought an injunction prohibiting Elmhurst from retaining or paying the fees of counsel for the aldermen in connection with the defense of the libel suit. The trial court dismissed the action pursuant to section 2-619 of the Code of Civil Procedure (735 ILCS 5/2-619 (West 1992)) and plaintiffs brought this appeal.

I. BACKGROUND
In September 1992, Joseph Joseph, Guy Spinelli and Mark Entwistle filed a libel action against various individuals. Plaintiffs Spinelli and Entwistle were Elmhurst aldermen, as were four of the defendants: Carol Josefowicz, Janice Vanek, Donald Olson, and Lawrence Schoenbeck. Several other individual defendants named in the libel complaint were not alleged to hold any public office. According to the libel complaint, in August 1992, Joseph, Spinelli and Entwistle were involved in an effort to have a referendum conducted on a question of public policy whether Elmhurst should restrict the number of aldermen to one per ward. The libel complaint alleged that the individual defendants formed a voluntary association known as the "Elmhurst petition integrity committee" for the purpose of opposing the referendum and that certain members of the committee, acting on behalf of all members of the committee, made statements or released documents falsely accusing the plaintiffs of fraud and perjury in connection with their efforts to cause the referendum question to be placed on the ballot.
Aldermen Josefowicz and Vanek both requested that Elmhurst defend and indemnify them in the libel action. Aldermen Olson and Schoenbeck, who were also named as defendants in the libel action, did not make such a request. On November 23, 1992, by a vote of eight to five, the Elmhurst city council authorized Elmhurst to provide for the defense of Alderman Josefowicz. Aldermen Vanek, Olson, and Schoenbeck cast "yea" votes and Alderman Josefowicz abstained from voting. On December 7, 1992, by a vote of eight to three, the Elmhurst city council authorized Elmhurst to provide for the defense of Alderman Vanek. Aldermen Josefowicz, Olson, and Schoenbeck voted "yea" and Alderman Vanek abstained.
On December 15, 1992, plaintiffs filed this action for declaratory and injunctive relief against Elmhurst, its mayor, treasurer, and city manager, and the aldermen who voted in favor of providing a defense for Aldermen *1337 Josefowicz and Vanek. Count I of plaintiffs' complaint sought a declaratory judgment that the resolutions approving the defense of Aldermen Josefowicz and Vanek were void because they provided for the unlawful expenditure of city funds for a private purpose. Count II sought a declaratory judgment that the resolutions were invalid because the aldermen named as defendants in the libel suit were disqualified from voting due to a conflict of interest and, therefore, the resolutions failed to receive the affirmative votes of a majority of the members of the city council necessary for passage. Count III sought injunctive relief based on the allegations of counts I and II. Count IV, which is not at issue in this appeal, sought an award of attorney fees.
Defendants filed a combined motion to dismiss pursuant to section 2-619 of the Code of Civil Procedure (735 ILCS 5/2-619 (West 1992)) and for summary judgment. In the summary judgment portion of their motion, defendants asserted that the expenditure of funds in the defense of Aldermen Josefowicz and Vanek served a proper public purpose. In the portion of their motion seeking dismissal pursuant to section 2-619, defendants challenged count II, asserting that the aldermen defending against libel allegations had no personal financial interest in the decision to defend the other aldermen. In the portion of their motion seeking dismissal pursuant to section 2-619, defendants also asserted, inter alia, that the plaintiffs lacked standing to bring a taxpayer's action and that the court lacked subject-matter jurisdiction because the action was a "political case."
The trial court granted defendants' motion to dismiss pursuant to section 2-619. The trial court's comments from the bench in announcing its ruling indicate that the court concluded that the conduct alleged in the libel complaint might arguably be within the scope of the official duties of an aldermen and this possibility gave rise to a duty on Elmhurst's part to provide a defense. With respect to count II, the court concluded that no pecuniary interest was alleged that would disqualify any of the four alderman named in the libel action from voting. The trial court explicitly declined to rule on defendants' standing argument and made no mention of defendants' argument regarding subject-matter jurisdiction.

II. LEGALITY OF EXPENDITURE FOR DEFENSE IN THE LIBEL CASE
We first consider whether the trial court properly dismissed count I of plaintiff's complaintwhich sought a declaration that the expenditure of funds for the defense of Aldermen Josefowicz and Vanek was improperand the corresponding request for injunctive relief in count III. Initially we note that although the trial court entered an order of dismissal pursuant to section 2-619 of the Code of Civil Procedure (735 ILCS 5/2-619 (West 1992)), the court essentially adopted the reasoning set forth in the portion of defendants' motion seeking summary judgment. Nonetheless, the procedural discrepancy is of no consequence in this case. As explained below, with respect to count I, the record does not support either dismissal under section 2-619 or summary judgment in favor of defendants, and the trial court's order must be reversed.
Section 2-302 of the Local Governmental and Governmental Employees Tort Immunity Act (Immunity Act) provides in pertinent part:
"If any claim or action is instituted against an employee of a local public entity based on an injury allegedly arising out of an act or omission occurring within the scope of his employment as such employee, the entity may elect to do any one or more of the following:
* * * * * *
(b) Indemnify the employee * * * for his court costs incurred in the defense of such claim or action;
(c) Pay, or indemnify the employee * * * for a judgment based on such claim or action." 745 ILCS 10/2-302 (West 1992).
Section 3.21 of the Elmhurst Municipal Code provides, in pertinent part:
"(a) To the fullest extent permitted by the constitution of the State of Illinois and applicable law * * * each of the following *1338 officials and employees of the city viz: * * * Each Alderman * * * shall be indemnified, defended and held harmless by the city from and against all liabilities for compensatory damages, expenses of investigation, judgments and amounts paid in settlement which may be imposed upon or reasonably incurred or paid by such official or employee in connection with or resulting from any claim made against him * * * by reason of his being or having been such official or such employee of the city and acting within the scope of his employment or official duties." (Emphasis added.) Elmhurst, Ill., Municipal Code § 3.21 (19).
Before proceeding, we address defendants' argument that the determination of the Elmhurst city council that the defense of Aldermen Josefowicz and Vanek serves a valid public purpose is entitled to great deference from this court. They cite Clayton v. Village of Oak Park (1983), 117 Ill.App.3d 560, 73 Ill.Dec. 112, 453 N.E.2d 937 and People ex rel. City of Salem v. McMackin (1972), 53 Ill.2d 347, 291 N.E.2d 807, for the propositions that whether a proposed expenditure serves a public interest is, in the first instance, a determination to be made by the legislative body empowered to expend the funds and that the legislative body has broad discretion in making this determination. (See Clayton, 117 Ill.App.3d at 567, 73 Ill. Dec. 112, 453 N.E.2d 937; McMackin, 53 Ill.2d at 355, 291 N.E.2d 807.) Defendants also point out that if the principal purpose of an expenditure is public, the expenditure may not be challenged simply because there is an incidental benefit to private interests. McMackin, 53 Ill.2d at 355, 291 N.E.2d 807; Clayton, 117 Ill.App.3d at 567, 73 Ill.Dec. 112, 453 N.E.2d 937.
Both McMackin and Clayton addressed the question of whether proposed expenditures violated section 1(a) of article VIII of the Illinois Constitution of 1970 which provides that "[p]ublic funds, property or credit shall be used only for public purposes." (Ill. Const.1970, art. VIII, § 1(a).) However, the subject of the case at bar, a local public entity's authority to expend funds defending or indemnifying its officers and employees, is not governed solely by this constitutional provision. The General Assembly has enacted legislation addressing the subject. More importantly, Elmhurst, which is a home rule unit, has enacted a general ordinance defining its obligation to defend and indemnify its officers and employees. A municipality is without power to violate its own ordinances. (Beneficial Development Corp. v. City of Highland Park (1994), 161 Ill.2d 321, 329, 204 Ill.Dec. 211, 641 N.E.2d 435.) Determination of the application of a legislative enactment to the facts of a particular case is a judicial rather than legislative function.
Moreover, even if the constitutional provision were the sole constraint on Elmhurst's authority to undertake the defense of Aldermen Josefowicz's and Vanek, the outcome of this case would still depend on whether the libel action arose from acts within the scope of Aldermen Josefowicz and Vanek's official duties. Defraying the costs of purely private litigation involving the holder of a public office, but unrelated to, or not arising out of the exercise of the duties of that office, cannot be considered a proper public purpose. While a legislative body may have broad discretion in determining what constitutes a public purpose, that discretion is not unlimited, and courts will intervene when public property is devoted to a purely private use. (See, e.g., O'Fallon Development Co. v. City of O'Fallon (1976), 43 Ill. App.3d 348, 2 Ill.Dec. 6, 356 N.E.2d 1293.) Again, whether or not the libel action against Aldermen Josefowicz and Vanek is based on acts within the scope of their official duties is a matter for judicial rather than legislative determination. Accord Palmentieri v. City of Atlantic City (1988), 231 N.J.Super. 422, 429, 555 A.2d 752, 755.
We do agree with defendants, however, that certain principles developed in cases dealing with an insurer's duties to defend and indemnify apply to the determination of the city's duties under its ordinance to defend and indemnify. (Accord Board of Trustees, Village of Bolingbrook Police Pension Fund v. Underwood, Neuhaus & Co. (N.D.Ill. 1990) 742 F.Supp. 984, 989.) In Aetna Casualty & Surety Co. v. Prestige Casualty *1339 Co. (1990), 195 Ill.App.3d 660, 664, 142 Ill.Dec. 689, 553 N.E.2d 39, which defendants have cited and which plaintiffs appear to agree is applicable to the case at bar, the court observed:
"[The duty to defend and the duty to indemnify] are separate and distinct duties, and the duty to defend is broader than the duty to indemnify. [Citation.] The duty to indemnify arises only after the insured becomes legally obligated to pay damages in the underlying action. [Citation.] On the other hand, the duty to defend is triggered by the allegations in the underlying complaint that bring the claim within or potentially within the policy coverage. [Citation.] * * * Unless the complaint, on its face, clearly alleges facts which, if true, would exclude coverage, the potentiality of coverage is present and the insurer has a duty to defend."
Accordingly, we must consider whether the allegations of the libel complaint, if true, would establish that Aldermen Vanek and Josefowicz were acting outside the scope of their official aldermanic duties. Plaintiffs contend that the alleged wrongful conduct in the libel action arose from efforts to challenge petitions to hold a referendum relating to the number of Aldermen. Plaintiffs argue that such challenges are the prerogative of "legal voters" (10 ILCS 5/10-8(B) (West 1992)) and Vanek and Josefowicz would have acted in that capacity in allegedly performing the acts giving rise to the libel action. Defendants respond, inter alia, that the allegedly libelous statements were separate from the formal objections to referendum petitions. Defendants contend that the record establishes that the allegedly libelous statements were made in conjunction with an investigation of alleged vote fraud undertaken at the request of constituents of Aldermen Vanek and Josefowicz. Defendants also suggest that because the statements relate to alleged criminal activity, they might arguably be related to an alderman's duties as a conservator of the peace (65 ILCS 5/3-9-4 (West 1992)).
In our view, the content of the allegedly libelous statements and the relationship of those statements to an effort to oppose formally the referendum petitions are not necessarily the most profitable areas of inquiry in this case. The proposed referendum concerning the form of Elmhurst's local government is obviously a matter of concern to Elmhurst's citizens. Even though the Elmhurst city council may have no legislative power relative to the subject of whether the referendum question appears on the ballot, we are unprepared to say that it is outside the scope of an alderman's duties to comment on possible impropriety in bringing the referendum question before the voters. However, the manner in which the statements allegedly were made persuades us that if the allegations of the libel complaint are true, Aldermen Josefowicz and Vanek acted outside the scope of their official duties.
The gravamen of the libel complaint is that defamatory statements were made by or on behalf of the various individual defendants (including Aldermen Josefowicz and Vanek) in connection with their participation in the so-called Elmhurst petition integrity committee, described in the libel complaint as "a voluntary association formed for the purpose of attacking a certain question of public policy * * * which seeks to restrict the number of Aldermen to one per ward in Elmhurst, Illinois." The libel complaint specifically alleges that the statements were made by the individual defendants as members of the Elmhurst petition integrity committee and seeks judgment from the defendants "doing business as" the Elmhurst petition integrity committee. If, as alleged, in pursuit of a political objective Aldermen Josefowicz and Vanek allied themselves with a purely private organization, we fail to see how they can claim to have been performing official duties. Thus, while it might arguably be within the realm of an alderman's duties to speak or act in connection with perceived misconduct relating to a referendum affecting the form of local government, statements or conduct through the medium or instrumentality of a private political organization constitutes private activity.
Defendants cite cases from other jurisdictions where courts have upheld the expenditure of public funds to defend a government official or employee sued for libel. (See Maitland v. Town of Thompson (1942), 129 *1340 Conn. 186, 27 A.2d 160; Whelan v. Town of Hingham (1965), 348 Mass. 402, 204 N.E.2d 118; Cobb v. City of Cape May (1971) 113 N.J.Super. 598, 274 A.2d 622.) These cases stand for the general propositions that it is within the scope of a public official's duties to inform his or her constituents of the reasons for an official act (Maitland, 129 Conn. at 191, 27 A.2d at 162; Whelan, 348 Mass. at 403-04, 204 N.E.2d at 119; Cobb, 113 N.J.Super. at 603, 274 A.2d at 625), and that the right to provide for the defense of a public official does not depend on whether he acts "precisely within his statutory authority," but whether he acts "bona fidely [sic] within the apparent sphere of [his] duties and for the benefit of the municipality" (Cobb, 113 N.J.Super. at 602, 274 A.2d at 625). However, in none of these cases were the allegedly libelous statements made under the aegis of a purely private organization as is alleged in the libel complaint against Aldermen Josefowicz and Vanek, Aldermen Olson and Schoenbeck, and various other defendants who hold no office.
More closely analogous to the case at bar than any of the cases cited by defendants is Palmentieri v. City of Atlantic City (1988), 231 N.J.Super. 422, 555 A.2d 752, where it was held that the City of Atlantic City had no authority to pay for the defense of a libel action against a city council member based on remarks made to reporters following a privately sponsored rally. In Palmentieri, a group of residents of Atlantic City, all of whom were black, formed the citizens for action committee to address concerns of racial discrimination in the community. Atlantic City councilman Gene Dorn was selected as the committee's leader. The group organized a "Black Unity Rally" at which many black civic and governmental leaders spoke, including the mayor of Atlantic City and several city council members. No white civic or governmental leaders were invited to participate in the rally and the city council had no formal involvement in the rally. After the rally, Dorn spoke with reporters. Commenting on a black executive for a local casino, Dorn stated, "we feel [he] is as racist as the most bigoted white man walking the face of the earth." Palmentieri, 231 N.J.Super. at 427, 555 A.2d at 754.
The Palmentieri court held that this statement was outside the scope of Dorn's duties as a city council member noting that "the Citizens for Action Committee and its rally were purely civic involvements, rather than governmental efforts." (231 N.J.Super. at 441, 555 A.2d at 761.) The court stated:
"The question of whether racism can properly be a concern of the Atlantic City government may be answered in the affirmative. Racial discrimination in any form and any milieu is an offense to all government and all individuals, morally and legally. However, not all action in opposition to racial discrimination is necessarily governmental action. Civic groups and individuals may also act in this area in a private capacity. The fact that such groups are joined by governmental officials does not necessarily clothe their actions with governmental authority." Palmentieri, 231 N.J.Super. at 436, 555 A.2d at 759.
The Palmentieri court further observed that "[a] city council acts as a body; factions of that body are not government." (231 N.J.Super. at 436, 555 A.2d at 759.) The court concluded:
"[A]lthough racism is a serious concern of all government, the Citizens for Action Committee was a purely civic organization formed to broach the problem through citizen awareness and public exposition at the * * * rally. Dorn attended as its president, lending his stature as a city councilman, but not his authority. To conclude otherwise would be to widen the scope of the governmental ambit to include every civic, religious, charitable or fraternal organization merely because its tenets are embraced and publicly endorsed by a government official. Such a result would be untenable." (Emphasis added.) 231 N.J.Super. at 438, 555 A.2d at 760.
We acknowledge that the decision in Palmentieri was the product of number of factors, not all of which are present here. Notably, the citizens for action committee conducted its activities on a racially exclusive basis, and the court commented that "exclusion of public officials from participation in the rally solely on the basis of race, while *1341 allowable for private activity, is inconsistent with any legitimate governmental activity." (231 N.J.Super. at 437, 555 A.2d at 760.) There is absolutely nothing in the record in the case at bar suggesting that the Elmhurst petition integrity committee functions on a racially discriminatory basis. This distinction is certainly important. At the same time purely private political or civic activity does not assume a governmental character merely because it is not antithetical to legitimate governmental activity.
Informed by the thoughtful discussion in Palmentieri, we conclude the allegations against Aldermen Josefowicz and Vanek portray entirely private political activity which might relate to their personal views about city government or the integrity of the referendum process, but do not relate to the duties of their office. Their participation in a private political organization did not empower that organization to exercise a governmental function, and for that reason any statements made by that organization on behalf Aldermen Josefowicz and Vanek could not be considered the discharge of their official aldermanic duties. Moreover, the alleged objective of the Elmhurst petition integrity committee was not within the scope of the Elmhurst city council's legislative power. This alleged circumstance itself strongly suggests that Aldermen Josefowicz and Vanek participated in the committee's activities not as an incident to their aldermanic duties, but precisely because they could not accomplish their objective of blocking the referendum by means of their official positions. Accordingly, defendants' efforts to recast the statements attributed to Ms. Josefowicz and Ms. Vanek in terms of aldermanic functions such as the investigative function or an alderman's duties as a conservator of the peace are unpersuasive. We therefore conclude that the allegations of the libel complaint, if true, establish conduct outside the scope of the official duties of an alderman.
Defendants also contend that the defense of Aldermen Josefowicz and Vanek was proper because the libel action is a suit against them in their official capacity. Defendant's base this characterization solely on the fact that the allegations of the libel complaint mention that Ms. Josefowicz and Ms. Vanek hold the office of alderman. However, the complaint does not seek a judgment against them in their official capacities as aldermen. Rather it seeks a judgment against the various individual defendants "d/b/a" the Elmhurst petition integrity committee. Accordingly, we disagree with defendants' assertion that Ms. Josefowicz and Ms. Vanek were sued in their official capacity.
In view of the foregoing, the trial court erred in dismissing count I pursuant to section 2-619. We note that although the trial court did not specify which subsection of section 2-619 authorized dismissal, it is clear that none of the specific defenses set forth in subsections (a)(1) through (a)(8) apply. Subsection (a)(9) provides that a defendant may move for dismissal when the challenged claim is barred by an "affirmative matter avoiding the legal effect of or defeating the claim." (735 ILCS 2-619(a)(9) (West 1992).) Defendants have failed to establish any such affirmative matter. As noted earlier, although the trial court dismissed the case pursuant to section 2-619, it apparently did so on the basis of arguments advanced by defendants in support of the portion of their motion seeking summary judgment. However, in view of our discussion above, the entry of summary judgment obviously also would have been improper. Summary judgment is appropriate where "the pleadings, depositions, and admissions on file, together with the affidavits, if any, show that there is no genuine issue as to any material fact and that the moving party is entitled to a judgment as a matter of law." (735 ILCS 5/2-1005(c) (West 1992); Gilbert v. Sycamore Municipal Hospital (1993), 156 Ill.2d 511, 517-18, 190 Ill.Dec. 758, 622 N.E.2d 788.) Since we reject defendants' argument that the conduct alleged in the libel complaint could be considered to within the scope of the official duties of an alderman, defendants are not entitled to judgment as a matter of law.
[Editor's Note: Text Omitted Pursuant to Supreme Court Rule 23.]

CONCLUSION
For the foregoing reasons, we reverse the judgment of the circuit court of Du Page county dismissing count I and count III (to the extent it seeks injunctive relief corresponding *1342 to the declaratory relief sought in count I). In all other respects the judgment is affirmed, and the cause is remanded for further proceedings in accordance with the views expressed herein.
Affirmed in part; reversed in part and remanded.
WOODWARD and GEIGER, JJ., concur.
