The Cook County state’s attorney’s office has filed a lawsuit to keep the newly elected mayor of south suburban Markham from taking the oath of office — an action he was warned about before the election.

The three-count suit, filed Wednesday in Cook County Circuit Court, seeks a declaratory judgement from the court that Roger Agpawa is not eligible to hold office as mayor of the city of Markham due to a prior felony conviction. It also seeks an injunction to keep him from taking the oath of office.

Agpawa was elected April 4 with about 72 percent of the vote, according to Cook County election results.

He pleaded guilty to a felony count of mail fraud in federal court on Aug. 30, 1999, according to court documents, and completed a sentence of 36 months of probation and a requirement to perform 200 hours of community service.

In a letter sent March 23, the state’s attorney’s office warned Agpawa he would not be eligible to take the oath of office for mayor because state law bars felons from being sworn in to municipal office.

“My legal counsel knows that I have the right — just as I have the right to vote — to run for office and be elected,” he told the Chicago Sun-Times before the election. “The ultimate decision rests with the Markham village board for me to be sworn in.”

Agpawa and a representative of the city of Markham could not be reached for comment Wednesday night.