
572 N.W.2d 591 (1997)
CITY OF WINDSOR HEIGHTS, Appellee,
v.
Christos SPANOS, Appellant.
No. 96-2160.
Supreme Court of Iowa.
December 24, 1997.
Rehearing Denied January 30, 1998.
Dean Stowers of the Rosenberg Law Firm, Des Moines, for appellant.
Thomas J. Miller, Attorney General, Martha E. Boesen, Assistant Attorney General, and Kim Baer, Assistant City Attorney, for appellee.
Considered by HARRIS, P.J., and NEUMAN, SNELL, ANDREASEN, and TERNUS, JJ.
*592 TERNUS, Justice.
A jury found the appellant, defendant Christos Spanos, guilty of violating two state statutes: (1) Iowa Code section 321.166(7) (1995), requiring the proper display of registration stickers on vehicle license plates; and (2) Iowa Code section 719.1, prohibiting interference with official acts of a peace officer. The associate district court judge sentenced Spanos on both offenses and the district court affirmed. We granted the defendant's application for discretionary review. On appeal, we conclude the city attorney for the City of Windsor Heights had de facto authority to prosecute the improper-display-of-registration-stickers charge, but not the interference-with-official-acts charge. Therefore, we affirm in part and reverse in part.

I. Background Facts and Proceedings.

On March 1, 1996, Windsor Heights police officer Jason Bryan witnessed Spanos operating a motor vehicle without proper registration stickers on his license plates. At the time, the defendant's car was in the northbound lane of 63rd Street, which is within the city limits of Des Moines. Officer Bryan stopped the Spanos vehicle after the defendant had turned onto Hickman Road, also in Des Moines.
Officer Bryan approached the defendant's car and questioned Spanos concerning his driver's license and car registration. During the course of this questioning, Spanos attempted to drive away. Officer Bryan told Spanos several times to stop and get out of his car. When Spanos did not comply, the officer called for assistance.
Upon the arrival of additional police officers, Spanos got out of his vehicle, but refused to be seated in a patrol car, as he was requested to do. During the officers' attempt to handcuff Spanos, he resisted by flailing and kicking. Officer Bryan arrested Spanos and charged him with the violation of two Windsor Heights' ordinances, one for interference with official acts and the other for improper display of registration stickers, both simple misdemeanors.
The defendant demanded a jury trial. On the day set for trial and over the defendant's objections, the trial court allowed the city attorney to amend the charges to allege violations of state laws because the alleged violations had occurred in Des Moines, not Windsor Heights. The case proceeded to trial, resulting in guilty verdicts on both charges. After an unsuccessful appeal to the district court, this court granted the defendant's application for discretionary review.
On appeal, Spanos challenges both convictions on the basis the city had no authority to prosecute the amended charges. He also claims error in the instructions on the interference-with-official-acts charge and the procedures invoked for the trial of that charge. We conclude the city had no authority to prosecute the defendant on the state charge of interference with official acts, but did have de facto authority to prosecute the charge for improper display of registration stickers. This ruling makes it unnecessary to consider the two additional errors claimed with respect to the interference-with-official-acts charge.

II. Authority of City Attorney.

When the city attorney requested permission to amend the charges to allege state law violations, the defendant's objection to the amendment was based, in part, on the city attorney's lack of authority to prosecute such violations. Notwithstanding this objection, the trial court allowed the amendment pursuant to Iowa Rule of Criminal Procedure 4(8).
We review the trial court's allowance of the City's amendment for an abuse of discretion. See State v. Maghee, 573 N.W.2d 1, 5 (Iowa 1997). The party claiming an abuse of discretion must show "that the court exercised [its] discretion on grounds or for reasons clearly untenable or to an extent clearly unreasonable." Id. "An abuse of discretion is synonymous with unreasonableness." Frank v. Iowa Dep't of Transp., 386 N.W.2d 86, 87 (Iowa 1986). A decision is unreasonable where it is not based on substantial evidence, see id., or is based on an erroneous application of the law. See 5 Am. Jur.2d Appellate Review § 695, at 365 (1995).
A. De jure authority. The county attorney is vested with authority to prosecute *593 persons charged with violating a state law. See Iowa Code § 331.756(1).[1] The city claims, however, that Polk County and the City of Windsor Heights have an agreement allowing the city to prosecute traffic violations and simple misdemeanor violations occurring on 63rd Street. (Both Windsor Heights and Des Moines are located in Polk County.) The city relies on the authority of Iowa Code chapter 28E, which permits local governments "to cooperate in ... ways of mutual advantage." Iowa Code § 28E.1. Section 28E.12 specifically allows a political subdivision of the state to "contract with [another political subdivision] to perform any governmental service, activity, or undertaking which [either of the political subdivisions] is authorized by law to perform." This agreement must "be authorized by the governing body of each party to the contract," id. § 28E.12, and be "filed with the secretary of state and recorded with the county recorder," id. § 28E.8.
The city offered a letter from the Polk County Attorney, John Sarcone, stating:
When I took over as County Attorney in 1991, it was my understanding that a 28E agreement was in existence between this office and Windsor Heights regarding these prosecutions. Since that time we have continued to operate under that agreement which has been beneficial to this office as well as the City of Windsor Heights. In particular, it is my understanding that pursuant to the agreement Windsor Heights prosecutes violations, both traffic and simple misdemeanors, which occur on 63rd Street. We believe the agreement has worked well and see no reason to change the manner in which these cases are prosecuted or who prosecutes them....
The city was unable to produce a copy of the 28E agreement and had no other evidence that such an agreement had been formally approved by the governing bodies of the city and the county or had been filed as required by chapter 28E.
We conclude there is not substantial evidence to support a finding that the statutory prerequisites for the creation of a valid 28E agreement were met. Although the county attorney stated he thought the city and county had entered into a 28E agreement, he offered no understanding on whether the agreement had been approved and filed as required by chapter 28E. Moreover, the city attorney stated the city and the county had been operating under such an agreement for four or five years; yet she candidly admitted they had checked the secretary of state's records for the last five years and had not found a copy of the agreement. Therefore, the city's assertion it had de jure authority to prosecute the state charges against Spanos cannot provide a tenable reason to support the trial court's exercise of discretion.
B. De facto authority. The city claims that even if it failed to prove the agreement between the city and county met the requirements of chapter 28E, the city still had authority to prosecute the offenses in question under the doctrine of officers de facto. In the case of a de facto officer, authority may be found in the absence of appointment or election, if the officer "acted as such under such circumstances of reputation or acquiescence as are calculated to induce people, without inquiry, to submit to or invoke his action in the supposition that he is in fact the officer he assumes to be." Buck v. Hawley & Hoops, 129 Iowa 406, 409, 105 N.W. 688, 689 (1906). We have stated the rationale for this theory: "`[J]ustice and necessity require that [the officer's] acts, done within the scope of official authority and duty, be sustained, to the end that the rights and interests of third person[s] be protected and preserved.'" State v. Driscoll, 455 N.W.2d 916, 917 (Iowa 1990) (quoting Buck, 129 Iowa at 409, 105 N.W. at 689). The de facto officer theory applies where a qualified official, by technical infirmity, does not validly *594 hold the official position. See State v. Palmer, 554 N.W.2d 859, 865-66 (Iowa 1996).
The city claims that its attorney has the de facto authority to prosecute state charges. It argues the city and county's possible failure to follow the procedures required by chapter 28E is an infirmity that does not undermine the purpose of the statute.[2] Under the circumstances of this case, we agree. The city and county attorney have understood a valid 28E agreement existed and have conducted prosecutions of violations on 63rd Street accordingly. In the words of this court in Driscoll, "[i]t would be contrary to the public good, and produce only uncertainty and confusion, were we to allow defendants like [Spanos] to collaterally attack the authority of a public official who was otherwise [granted the authority to prosecute]." 455 N.W.2d at 918.
The same reasoning was used by the Arkansas Court of Appeals to uphold the prosecution of a defendant on state charges by a city attorney. See Chronister v. State, 55 Ark.App. 93, 931 S.W.2d 444 (1996). In Chronister, an Arkansas statute provided that a city attorney could prosecute state misdemeanors if the city attorney agreed to the appointment. 55 Ark.App. at 95, 96, 931 S.W.2d at 445. The court found the city attorney had not complied with the statute, so he did not have de jure authority. Id. Instead, the court held the city attorney was a de facto official in relation to prosecution of state law violations. Id. We agree with the court's reasoning:
A de facto official is one who by some color of right is in possession of an office, and performs its duties with public acquiescence, though having no right in fact; the acts of de facto officials may not be questioned based upon ... the lack of legal authority except by some direct proceeding instituted for the purpose by the State or by someone claiming the office de jure, or when the person himself attempts to build up some right, or claim some privilege by reason of being the official he claims to be; in all other cases, the acts of an officer de facto are as valid and effectual while he retains the office as if he were an officer by right, and the same legal consequences will flow from them for the protection of the public and third parties.

Id. (emphasis added). As in the case before us, the city attorney in Chronister was a de jure city attorney, but had only de facto authority with respect to the specific area at issue.
We, like the Arkansas court, think the principles of a de facto official apply under the circumstances before us. The Windsor Heights city attorney was a de jure city attorney but lacked the actual authority to prosecute state traffic and misdemeanor charges. The city attorney's lack of legal authority as to these charges arose not from an unauthorized usurpation of that power from the county attorney, but from an apparent defect in the process by which that power was delegated by the county attorney to the city attorney. Consequently, the city attorney has de facto authority to prosecute charges within the scope of the alleged 28E agreement, and such authority may not be collaterally attacked in this proceeding.
C. Scope of de facto authority. We now turn to a review of the agreement between the county and city to determine if it authorized the city attorney to prosecute charges such as those brought against Spanos. The agreement, according to the county attorney, allowed the Windsor Heights city attorney to prosecute "violations, both traffic and simple misdemeanors, which occur on 63rd Street."
1. Improper-registration charge. The defendant's alleged violation of section 321.166(7) (improper display of registration stickers) was observed by Officer Bryan when the defendant's car was on 63rd Street. A violation of section 321.166(7) is a simple misdemeanor. See Iowa Code § 321.482. We conclude the city attorney had de facto authority under the agreement between the city and county to prosecute Spanos on this charge.
We hold the trial court did not abuse its discretion in allowing the city to amend the *595 improper-registration charge from a city violation to a state violation. Therefore, we affirm the defendant's conviction of the amended offense alleging a violation of Iowa Code section 321.166(7).
2. Interference-with-official-acts charge. The defendant's acts giving rise to this charge occurred after he had parked his vehicle on Hickman Road in Des Moines. Consequently, any violation of section 719.1 did not occur in Windsor Heights or on 63rd Street. The agreement between the city and county did not give the city authority to prosecute offenses occurring in Des Moines, unless they happened on 63rd Street. Consequently, the interference-with-official-acts charge was not within the de facto authority claimed by the city attorney.
Because this charge was not within the scope of the agreement upon which the city relied for the source of its authority, there was no factual basis to support a conclusion by the trial court that the city had the de facto authority to prosecute this charge. Therefore, we hold the trial court abused its discretion in allowing the city to amend the interference-with-official-acts charge to allege a violation of section 719.1 that it had no authority to prosecute. We reverse the judgment and sentence entered upon the defendant's conviction of this offense. Costs on appeal are taxed equally to the parties.
AFFIRMED IN PART, AND REVERSED IN PART.
NOTES
[1]  This Code section states:

The county attorney shall:
1. Diligently enforce or cause to be enforced in the county, state laws and county ordinances, violations of which may be commenced or prosecuted in the name of the state, county, or as county attorney, except as otherwise provided.
Iowa Code § 331.756(1).
[2]  Spanos does not argue any defect undermined the goals of chapter 28E. See Palmer, 554 N.W.2d at 865 (holding any failure to comply with the statutory qualifications and method of appointment for a peace officer that undermined the purpose of the statute prevented the official from claiming de facto status).
