CLEVELAND (AP) _ Police officers in uniform were among 34 people arrested Thursday after an FBI sting operation that set up gambling dens and allegedly hired officers to provide security and warn about impending raids.

Forty-seven people were charged in federal indictments unsealed Thursday. Twenty-three Cleveland police officers and seven former officers, a city parks police officer and three other people were arrested.

Thirteen others named in the indictments, none of them police officers, had not been arrested by late Thursday afternoon, police said.

Those arrested, some in police uniform, others wearing handcuffs, lined the walls of a federal court chamber during arraignment proceedings. Each was arraigned on some or all of four related gambling protection charges and conspiring to protect a narcotics shipment.

The FBI set up phony gambling operations and hired officers to provide security for clandestine games including poker, blackjack and craps, said William Branon, the agent in charge of the Cleveland FBI office.

''They were FBI sting operations,'' Branon said. ''We did not infiltrate any ongoing activity.''

Undercover agents made about 170 cash payments to officers, averaging between $300 and $400 each, he said.

Lawyer Patrick D'Angelo, hired by the Cleveland Police Patrolmen's Association to represent the arrested officers at arraignment, said Thursday he did not know enough about the indictments to comment. But the union's president, Robert Beck, complained: ''This is typical FBI grandstanding.''

Police Chief Edward Kovacic said active-duty officers were suspended. He said he didn't know about the sting until an internal investigation into possible police involvement in gambling failed and he asked the FBI for help.

''I was not disturbed one bit that the FBI had been conducting this, nor that I had not been told, because there was no reason for me to be told,'' the chief said.

The department cooperated with the FBI investigation after Kovacic learned of the probe in August 1990, he said.

''There was absolutely nothing done from that point on that was not done jointly,'' Kovacic said.

The narcotics charge also stemmed from an FBI sting in which police officers allegedly offered to help protect a drug shipment, Branon said.

Mayor Michael R. White said, ''Some may perceive this as a dark day for Cleveland and our community, but I don't. ... We must deal with our problems head-on.''