
818 N.E.2d 829 (2004)
353 Ill. App.3d 422
288 Ill.Dec. 894
The PEOPLE of the State of Illinois, Plaintiff,
v.
Thomas LANIGAN, Anthony Bohling, Andrew Remus, Daniel Troike and Robert Jones, Defendants and Petitioners-Appellants (The County of Cook, Intervening Respondent-Appellee).
No. 1-03-0421.
Appellate Court of Illinois, First District, Third Division.
October 20, 2004.
*832 Grund & Leavitt, P.C., Chicago (David I. Grund, Marvin J. Leavitt, Margarita T. Kulys and Alyssa Mogul, of counsel), for Appellant.
Richard A. Devine, State's Attorney of County of Cook, Chicago (Patrick T. Driscoll, Jr. and Patrick M. Blanchard, Assistant State's Attorneys, and Marcie Thorpe, Special Assistant State's Attorney, of counsel), for Appellee.
Presiding Justice KARNEZIS delivered the opinion of the court:
Defendants, Cook County deputy sheriffs Thomas Lanigan, Anthony Bohling, Andrew Remus, Daniel Troike and Robert Jones, were indicted on charges of official misconduct and obstruction of justice in connection with a car chase and shooting in which they engaged while off duty. Lanigan and Bohling were also charged with attempted first degree murder and aggravated discharge of a firearm. The trial court found defendants not guilty of all charges. The court denied defendants' petition for appointment of their private counsel as special State's Attorneys and payment of their attorney fees and costs by Cook County (the county) pursuant to section 3-9008 of the Counties Code (55 ILCS 5/3-9008 (West 2002)). Defendants appeal the court's denial of the petition, arguing that (1) defendants were acting in their official capacity as public officers of the Cook County sheriff's department at the time of the incident and, therefore, the State's Attorney had a duty to represent defendants pursuant to section 3-9005(a)(4) of the Counties Code (55 ILCS 5/3-9005(a)(4) (West 2002)); (2) the State's Attorney was unable to represent defendants since he was also prosecuting the case and, therefore, the court should have appointed private counsel to act as special State's Attorneys to represent defendants pursuant to section 3-9008; (3) payment of defendants' attorney fees is not precluded by the requirement that expenditure of public funds must be for a public purpose as stated in the Illinois Constitution (Ill. Const.1970 art. VIII, § 1); and (4) public policy requires that defendants be reimbursed for their attorney fees and costs and failure to do so results in unjust enrichment to the county. We affirm.

BACKGROUND
On the evening of June 2, 1999, at approximately 11:30 p.m., defendants were in Bohling's sport utility vehicle, driving east on 167th Street. Defendants were off duty and had been drinking. They had attended a fund-raiser together and visited a bar afterwards. Bohling was driving and Troike was in the front passenger seat. Jones and Remus were seated in the second row of seats, and Lanigan was seated in the back of the vehicle. Defendants were armed.
Cory Simmons and his girlfriend, Dominique Mapp, were also driving east on 167th Street. Simmons had made a turn onto 167th Street from a side street and apparently cut off defendants' vehicle in doing so. At the corner of 167th Street and Pulaski Avenue, Bohling pulled his vehicle up to the driver's side of Simmons' vehicle, which was stopped at a stoplight. Seeing Troike yelling something at him from the passenger-side window, Simmons rolled down his window to hear what Troike was saying. Troike cursed at Simmons. When Simmons responded with a rude gesture, Troike allegedly threw a beer can into Simmons' car, hitting Simmons and spilling beer on Simmons and Mapp. Simmons threw the beer can back at defendants' vehicle and followed it with *833 a small paint can he had in his car. Simmons pulled away and continued east on 167th Street. Defendants followed him.
Defendants followed Simmons for some time. Simmons tried to elude them by switching directions, cutting across curbs and turning his lights off as he drove. The chase ultimately went through Markham and Midlothian to Robbins, some 12 miles from the intersection where defendants first encountered Simmons. Along the way, the chase passed the Markham courthouse, where Lanigan, Troike, Jones and Remus had parked their cars prior to meeting Bohling. In Robbins, Simmons twice circled his father's house there, honking the horn, yelling for help and asking someone to call the police.
At some point, gunshots were fired in the vicinity of the two cars. Mapp heard two or three gunshots from behind her and thought they came from defendants' car. She thought defendants were trying to kill Simmons and her, and she got down on the floor of Simmons' car. Simmons also heard the shots coming from behind his car. Lanigan testified that he saw muzzle shots from the passenger side of Simmons' vehicle and thought that the occupants were shooting at defendants. Shortly after the first shots, Lanigan leaned out of the rear passenger-side window and fired four or five shots at Simmons' vehicle, shattering its rear window.
Simmons continued driving and reached the Robbins police station, where he stopped the car and reported the pursuit and shootings to an officer outside the station. Simmons and Mapp were taken into the station and questioned. They were subsequently put into a room with defendants, who had been pulled over by Robbins police in response to reports of shots being fired.
During defendants' pursuit of Simmons' vehicle, Jones used a cellular phone to call 911. He reported that defendants were off-duty sheriff's deputies, "five fucking coppers * * * with guns," in pursuit of a reckless driver. He subsequently reported that shots had been fired, apparently referring to the shots defendants thought came from Simmons' vehicle. The tape of Jones' phone calls reflected defendants' talking among themselves, exhorting each other that they were sheriff's deputies, had guns and to "kill `em, kill `em, fuck `em, knock them fuckers off the road."
At the Robbins police station, Robbins Chief of Police Holmes asked defendants whether they had fired any shots at Simmons. Defendants either denied firing any shots at Simmons or refused to answer the question. They also refused to turn over their firearms to Chief Holmes until their supervisors arrived at the station.
After an investigation, Lanigan and Bohling were indicted and charged with attempted first degree murder (720 ILCS 5/8-4, 9-1 (West 2002)) and aggravated discharge of a firearm (720 ILCS 5/24-1.2(a)(2) (West 2002)). All five defendants were indicted and charged with official misconduct (720 ILCS 5/33-3(b) (West 2002)) "in that they, being public employees in their official capacity, to wit: Cook County Sheriff's police officers, knowingly performed an act which they knew they were forbidden by law to perform." They were charged with official misconduct for committing the offense of failing to immediately report to the communications center that an officer had discharged a firearm or had been fired upon, in violation of both regulation 10.11 and general order 92-8 of the Cook County sheriff's department rules and regulations. They were also charged with official misconduct for committing the offense of obstruction of justice (720 ILCS 5/31-4(a) (West 2002)) when they, allegedly in order to prevent Lanigan from being appended for attempted *834 first degree murder or aggravated discharge of a firearm or official misconduct and to obstruct the prosecution of Lanigan on those same charges, knowingly furnished false information to police authorities by telling Chief Holmes that Lanigan did not fire his handgun and telling other law enforcement authorities that they heard shots and saw muzzle flashes coming from the passenger side of Simmons' vehicle.
In addition, Lanigan and Bohling were charged with official misconduct for committing the offenses of attempted first degree murder; aggravated discharge of a firearm; violation of regulation 13.1 of the Cook County sheriff's department rules and regulations, which states that department members will not engage in conduct which discredits the integrity or impairs the operation of the department, when they knowingly, without lawful justification, fired a weapon at Simmons; and violation of Cook County sheriff's department general order 87-7, paragraph II.C, which states that department members shall not resort to lawful use of a firearm until all other reasonable means of apprehension and control have been attempted without success, when they knowingly fired a weapon at Simmons without exhausting all other reasonable apprehension and control measures.
Lastly, all defendants were charged with committing the offense of obstruction of justice (720 ILCS 5/31-4 (West 2002)) for the same reasons stated in the official misconduct indictments.
Defendants filed a motion with the court requesting the appointment of their private counsel as special State's Attorneys and payment of their legal fees and costs by Cook County. Defendants argued they were entitled to representation by the State's Attorney because the complained-of conduct occurred while they were acting in their official capacities as public officers and employees of the Cook County sheriff's office and, because the State's Attorney's prosecution of the case created a conflict of interest preventing him from also representing defendants, the court should appoint special State's Attorneys to represent them and have the county pay their legal costs and fees. The court continued the petition until the conclusion of the trial.
Following a bench trial, the court found defendants not guilty of all charges. The court then denied defendants' petition for appointment of their counsel as special State's Attorneys and payment of their legal fees and costs by the county. Defendants timely appealed the court's denial of the petition.

ANALYSIS

DUTY TO DEFEND
The issue is whether a public employee charged with official misconduct is entitled to representation by private counsel, said counsel to be appointed by the court to serve as a special State's Attorney and to be compensated by the county. Pursuant to section 3-9005 of the Counties Code, the office of the State's Attorney has the duty "[t]o defend all actions and proceedings brought against his county, or against any county or State officer, in his official capacity, within his county." 55 ILCS 5/3-9005(a)(4) (West 2002). Although the county argues otherwise, it is clear that defendants were charged in their official capacity as sheriff's deputies, and the State's Attorney had a duty to defend them.
The indictments charged defendants with official misconduct "in that they, being public employees in their official capacity, to wit: Cook County Sheriff's police officers, knowingly performed an act which they knew they were forbidden by law to *835 perform." Defendants may have been off duty and intoxicated when they decided to chase and shoot at Simmons and Mapp, yet the county chose to charge defendants in their official capacity when it charged them with "official misconduct" pursuant to section 33-3(b) of the Criminal Code (720 ILCS 5/33-3(b) (West 2002)). Section 33-3(b) provides:
"Official Misconduct. A public officer commits misconduct when, in his official capacity, he commits any of the following acts:
* * *
(b) Knowingly performs an act which he knows he is forbidden by law to perform." (Emphasis added.) 720 ILCS 5/33-3(b) (West 2002).
Clearly, given that the indictments charge defendants as "being public employees in their official capacity" and that the definition of official misconduct requires that the public officer committed the misconduct "in his official capacity," the official misconduct charge necessarily entails an admission by the prosecution, i.e., the Cook County State's Attorney acting on behalf of the People of the State of Illinois, that defendants were acting in their official capacity when the alleged misconduct occurred. We do not, as the county apparently suggests, interpret the indictments as merely stating that defendants knew that they were performing illegal acts as a result of the fact that they were sheriff's police officers when "in their official capacity"; in other words, that defendants knew they were performing forbidden acts as a result of the knowledge gained through their employment as sheriff's deputies rather than that they were acting in their official capacity when they performed those acts.
"The official misconduct statutes are intended to punish the activities of public officials who have exploited their official positions to the detriment of the public good." Wright v. City of Danville, 174 Ill.2d 391, 407, 221 Ill.Dec. 203, 675 N.E.2d 110, 118 (1996). Clearly, defendants' chasing a vehicle and shooting in public streets and their subsequent failure to cooperate with Robbins police was to the detriment of the public good. Defendants could have chosen to continue on their way rather than pursue Simmons' vehicle or could have chosen to report the alleged reckless driver and leave it to on-duty law enforcement personnel to pursue Simmons. Rather than taking the least invasive or dangerous course, however, defendants exploited their positions as deputies in order to pursue and excuse their subsequent actions, to the detriment of the public good.
The official misconduct statute requires that the person charged with official misconduct, necessarily a public officer or employee, acted in his official capacity in his commission of the offense. People v. Samel, 115 Ill.App.3d 905, 908, 71 Ill.Dec. 738, 451 N.E.2d 892, 895 (1983). "[A] police officer need not be in uniform and on duty to perform an act within his official capacity." People v. Steinmann, 57 Ill.App.3d 887, 897, 15 Ill.Dec. 411, 373 N.E.2d 757, 764 (1978). The question is whether the person charged with official misconduct "manipulated his public office or employment in order to * * * perform a proscribed act." Samel, 115 Ill.App.3d at 908, 71 Ill.Dec. 738, 451 N.E.2d at 895, citing Steinmann, 57 Ill.App.3d at 897-98, 15 Ill.Dec. 411, 373 N.E.2d 757.
Here, defendants clearly manipulated their public offices as sheriff's deputies in order to chase and shoot at Simmons and Mapp. Discharging a firearm at another person, let alone attempting to kill another person, is illegal. It is only on the basis of their public employment as sheriff's *836 deputies that defendants would be permitted to commit such acts, and then in only the most exigent circumstances. Jones' call to 911 shows that defendants were manipulating their public employment as sheriff's deputies in order to follow Simmons' vehicle, allegedly because the driver was reckless, and to shoot at Simmons and Mapp. Testimony shows that, upon being stopped by Robbins police, defendants immediately stated that they were sheriffs deputies and showed their badges. At the Robbins police station, defendants again asserted their status as deputies acting in their official capacity as a rationale for their chase of and subsequent shooting at Simmons and Mapp, and on that basis refused to cooperate with Robbins police until their supervisors arrived.
"Official acts in the performance of the duties of an office do not mean simply the lawful acts of the officer holding that office, but include all acts done in his official capacity, under color and by virtue of that office." People ex rel. Woll v. Graber, 394 Ill. 362, 373, 68 N.E.2d 750, 756 (1946). Defendants' alleged acts of official misconduct, including failing to report that Lanigan had fired shots and obstructing justice for allegedly shielding Lanigan and falsely reporting that shots were fired from the passenger side of Simmons' vehicle, were done under color of defendants' position as sheriffs deputies.
The county argues that an official capacity suit entails a suit against an "office," rather than against an individual, and because defendants were charged individually rather than as representatives of the sheriff's office, section 3-9005 does not apply to defendants. We disagree with the county that the allegations that defendants committed crimes while being public employees in their official capacity does not equate to a lawsuit against them in their official capacity because it was brought against them as individuals. Defendants were not charged with official misconduct as individuals but as sheriff's deputies. The State's Attorney did not attempt to bind the Cook County sheriff or the sheriff's office for defendants' acts because only defendants were charged. However, the official misconduct criminal law which defendants were charged with violating does not apply to citizens not publicly employed. This is not a case where the defendants' public employment was incidental to the crimes charged. Rather, it is solely on the basis of that public employment that the official misconduct charges were possible. Had defendants not been acting in their official capacity, they could not have been charged as they were. The State's Attorney argued in closing that defendants were "clearly public employees of the Sheriff's Department in their capacity." He cannot now attempt to assert that they were not charged in that capacity. Accordingly, given the indictments and the facts of the case, defendants were charged in their official capacity as sheriff's deputies and the State's Attorney had a duty to defend them.

STATE'S ATTORNEY'S INTEREST IN THE CASE
The State's Attorney's duty to defend is not absolute. Section 3-9008 provides that "[w]henever the State's attorney is sick or absent, or unable to attend, or is interested in any cause or proceeding, civil or criminal, which it is or may be his duty to prosecute or defend, the court in which said cause or proceeding is pending may appoint some competent attorney to prosecute or defend such cause or proceeding." 55 ILCS 5/3-9008 (West 2002). "The appointment of a special State's Attorney under this provision requires the exercise of judicial discretion in determining whether a contingency authorizing the exercise of such power exists." *837 McDonald v. County Board, 146 Ill.App.3d 1051, 1056, 100 Ill.Dec. 531, 497 N.E.2d 509, 513 (1986). However, even if such contingency is found, "[t]he appointment of a special state's attorney is not mandatory, the statute only requiring that such an appointment `may' be made." Sommer v. Goetze, 102 Ill.App.3d 117, 120, 57 Ill.Dec. 784, 429 N.E.2d 901, 903 (1981). The statute thus "permits the hearing body to exercise its discretion in reviewing the circumstances to determine the need for such action. [Citations.] Such authority notwithstanding, that discretion must be exercised to promote the underlying policy of a just, fair and impartial hearing, and where those ends are thwarted, an abuse of discretion occurs." Sommer, 102 Ill.App.3d at 120, 57 Ill.Dec. 784, 429 N.E.2d at 903. Given that the State's Attorney had a duty to represent defendants, we must, therefore, review the circumstances here to determine whether the court was authorized to appoint a special State's Attorney or order the county to pay defendants' legal fees. We review a court's denial of a petition for appointment of a special State's Attorney under the abuse of discretion standard. Sommer, 102 Ill.App.3d at 120, 57 Ill.Dec. 784, 429 N.E.2d at 903.
The purpose of section 3-9008 is to "`prevent any influence upon the discharge of the duties of the State's Attorney by reason of personal interest.'" In re Harris, 335 Ill.App.3d 517, 520, 269 Ill.Dec. 752, 781 N.E.2d 549, 551 (2002), quoting People v. Morley, 287 Ill.App.3d 499, 503-04, 223 Ill.Dec. 104, 678 N.E.2d 1235 (1997). Our supreme court has interpreted the term "interested" as used in that section "to mean that the State's Attorney must be interested as (1) a private individual; or (2) a party to the action." McDonald, 146 Ill.App.3d at 1057, 100 Ill.Dec. 531, 497 N.E.2d at 513, citing Environmental Protection Agency v. Pollution Control Board, 69 Ill.2d 394, 400, 14 Ill.Dec. 245, 372 N.E.2d 50 (1977) and People v. Trolia, 107 Ill.App.3d 487, 496, 63 Ill.Dec. 155, 437 N.E.2d 804 (1982). The State's Attorney was not interested in the case as a private individual, and neither party asserts otherwise. The State's Attorney was also not a party to the suit because he commenced the criminal prosecution of defendants in the name of and on behalf of the people of the State of Illinois. However, section 3-9008 has been expanded to include situations in which the State's Attorney has a per se conflict of interest in the case, such as where defense counsel had a previous or contemporaneous relationship with the victim, the prosecution or an entity assisting in or benefitting from the prosecution. People v. Morales, 209 Ill.2d 340, 345-46, 283 Ill.Dec. 544, 808 N.E.2d 510, 513 (2004), citing People v. Lawson, 163 Ill.2d 187, 211, 206 Ill.Dec. 119, 644 N.E.2d 1172, 1183 (1994) (collecting cases).
Under the sixth amendment to the Constitution of the United States, defendants are entitled to the undivided loyalty of their counsel, free from conflicting interest and inconsistent obligations. People v. Moore, 189 Ill.2d 521, 537-38, 245 Ill.Dec. 95, 727 N.E.2d 348, 357 (2000). "`[A]n attorney cannot represent conflicting interests or undertake to discharge inconsistent duties.'" People v. Courtney, 288 Ill.App.3d 1025, 1031-32, 227 Ill.Dec. 271, 687 N.E.2d 521, 525 (1997), quoting People v. Gerold, 265 Ill. 448, 477, 107 N.E. 165, 177 (1914). Where a defense counsel has ties to a person or entity which would benefit from an unfavorable outcome for the defendants, a per se conflict of interest is created. Moore, 189 Ill.2d at 538, 245 Ill.Dec. 95, 727 N.E.2d at 357. Given the dangers of prejudice and influence inherent in a per se conflict, the mere *838 existence of the conflict is sufficient to constitute a violation of the defendants' rights, regardless of whether the conflict actually influenced counsel or the outcome of the case. People v. Morales, 329 Ill.App.3d 97, 106, 263 Ill.Dec. 324, 768 N.E.2d 84, 92 (2002), rev'd on other grounds, Morales, 209 Ill.2d 340, 283 Ill.Dec. 544, 808 N.E.2d 510, citing People v. Stoval, 40 Ill.2d 109, 113, 239 N.E.2d 441, 443 (1968), quoting United States v. Myers, 253 F.Supp. 55, 57 (E.D.Pa.1966). "`Justice and the law must rest upon the complete confidence of the thinking public and to do so they must avoid even the appearance of impropriety.'" Courtney, 288 Ill.App.3d at 1033, 227 Ill.Dec. 271, 687 N.E.2d at 526, quoting Arizona v. Latigue, 108 Ariz. 521, 523, 502 P.2d 1340, 1342 (1972).
Clearly, a per se conflict of interest exists in this case. If the State's Attorney were to both prosecute and defend defendants, the appearance of impropriety would be grossly evident. Counsel from the same agency acting on opposing sides of a lawsuit, where the interests in the outcome of the suit are so directly at odds, creates a conflict that is apparent and obvious and which may affect counsels' performance in ways difficult to demonstrate or detect. See Morales, 329 Ill.App.3d at 106, 263 Ill.Dec. 324, 768 N.E.2d at 92, rev'd on other grounds, Morales, 209 Ill.2d 340, 283 Ill.Dec. 544, 808 N.E.2d 510, citing Lawson, 163 Ill.2d at 210, 206 Ill.Dec. 119, 644 N.E.2d at 1183; Stoval, 40 Ill.2d at 113, 239 N.E.2d at 444. The State's Attorney cannot represent defendants contemporaneously with his prosecution of defendants. Accordingly, because the State's Attorney has a per se conflict of interest in this case, the trial court has the discretion to appoint a disinterested attorney as a special State's Attorney in order to provide a just, fair and impartial hearing.
Pursuant to section 3-9008, the court "may" appoint a special State's Attorney. There is no requirement in the statute that, if the State's Attorney is interested in the case, the court "must" or "shall" appoint a special State's Attorney to take his place. The trial court exercised its discretion by denying defendants' requests to appoint their counsel as special State's Attorneys or to have the county pay for their counsel's legal fees. Where a per se conflict of interest exists, the State's Attorney has the burden of showing why a special State's Attorney should not be appointed (Courtney, 288 Ill.App.3d at 1034, 227 Ill.Dec. 271, 687 N.E.2d at 526) and apparently did so here to the court's satisfaction. The court found that, standing alone, the fact that defendants were charged with and acquitted of official misconduct was not sufficient to justify awarding fees to their attorneys. We agree. The "not guilty" finding does not show that defendants were acting properly within the scope of their duties as sheriff's deputies or even that they were acting as law officers at all. Rather, the verdict merely shows that there was reasonable doubt on those questions. Having reviewed all the facts in the case, the court found that defendants were not faultless. This finding is not unreasonable given that the evidence does tend to show, despite the language of the indictments, that defendants were acting as private individuals when they chased and shot at Simmons and Mapp. The court, therefore, did not abuse its discretion in failing to order that defense counsel be appointed special State's Attorneys or that the county pay defendants' legal fees and costs.

UNJUST ENRICHMENT
Defendants lastly argue that the court's failure to order the county to pay *839 defendants' legal fees results in unjust enrichment to the county. Pursuant to the Illinois Constitution, public funds are to be expended for a public purpose and "[d]efraying the costs of purely private litigation has always been outside the bounds of a proper public purpose." Wright, 174 Ill.2d at 400, 221 Ill.Dec. 203, 675 N.E.2d at 115. The unsuccessful criminal defense of a public employee for acts not arising out of the lawful exercise of the duties of the employees office is such purely private litigation for which public funds cannot be used. Wright, 174 Ill.2d at 400, 221 Ill.Dec. 203, 675 N.E.2d at 116. Therefore, if defendants had been found guilty of the criminal official misconduct charges against them, the county was under no duty to reimburse defendants' legal fees because public monies are not to be expended to pay the legal fees of public employees who violate the law. Wright, 174 Ill.2d at 403-04, 221 Ill.Dec. 203, 675 N.E.2d at 117. However, since defendants were found not guilty of the charges against them, the county could be ordered to pay defendants' legal fees by the trial court. However, we do not find that the court's failure to order the county to pay the fees amounts to unjust enrichment to the county. It is unclear whether defendants were acting in their official capacity. The court merely found that a reasonable doubt existed on that question, doubt sufficient to warrant a finding of not guilty on the official misconduct charges but not doubt sufficient to warrant the county paying defendants' defense fees. The county was only under an obligation to pay those fees if the court determined such a duty existed. Given the facts of the case, the court did not find that duty existed. Therefore, since the county had no duty to pay the fees, its failure to do so could not amount to unjust enrichment.
For the reasons stated above, we affirm the decision of the trial court.
Affirmed.
HARTMAN and SOUTH, JJ., concur.
