ST. LOUIS (AP) — The attorney for the man accused of shooting two police officers during a demonstration in Ferguson expressed surprise Wednesday at audio of jail telephone calls in which his client appears to confess.

Jeffrey L. Williams, 20, is accused of shooting and wounding the officers on March 12, during an early-morning rally sparked by the resignation of Ferguson's police chief.

Prosecutors say Williams told investigators he fired a gun but was aiming at someone else. KMOV-TV first obtained audio of several of Williams' phone conversations from at the St. Louis County Justice Center. St. Louis County Justice Services Director Herbert Bernsen confirmed the audio is from calls made by Williams and provided The Associated Press with the sound files.

It wasn't clear to whom Williams was speaking. In one call, Williams said he was having trouble with a group of people, prompting an exchange of gunfire.

"Nobody aiming at no police," Williams says. "I ran up the hill and he (an unidentified person) shot at the car. ... I shot back," Williams said.

In another conversation, Williams expressed concern about a possible lengthy prison sentence.

"Even though I was in the wrong, though, I should have just went the other way," he said. "Oh man, now I'm looking at 10 years."

Williams' attorney, Jerryl Christmas, has said Williams told him he never fired during the protest. Christmas told The Associated Press on Wednesday morning he hadn't heard the audio of the phone conversations, but he stood by what Williams told him.

"My client has maintained to me that he never fired a gun that night," Christmas said. "So until I'm able to see evidence that I can distinctly talk to him about, I have to maintain my commitment to the statements that he has made to me."

Christmas was also critical of the justice center for releasing audio that provides potential evidence against Williams. Inmates are warned that calls are recorded and are public record.

Ferguson has been a focal point since a white police officer fatally shot 18-year-old Michael Brown, who was black and unarmed, on Aug. 9. A grand jury in November declined to indict the former officer, Darren Wilson, who also was cleared of civil rights violations by the U.S. Department of Justice in March.

But a separate DOJ report found widespread racial bias in Ferguson's policing efforts and the municipal court system, which it said was driven by profit mostly extracted from black and low-income residents.

Several city officials were fired or resigned following the report. Among those was Police Chief Tom Jackson, and his resignation led several dozen people to protest outside of police headquarters. The demonstration was about to break up when shots rang out. A St. Louis County officer was shot in the shoulder; a Webster Groves officer was hit in the face. Both are expected to fully recover.