The new U.S. attorney for Philadelphia spoke Wednesday to a room full of city police officers and commanders, expressing support for local law enforcement despite what he described as an atmosphere of criticism of cops across the country.

"I respect you, I admire you, and I thank you," William McSwain said, earning a standing ovation from the crowd of several hundred uniformed officers. His appearance at the Police Academy in Northeast Philadelphia was McSwain's first public event since being confirmed as the top federal law enforcement officer in the region by the U.S. Senate last month.

McSwain, formerly a prosecutor and attorney in private practice, told the officers that "some agenda-driven individuals want to highlight a more critical viewpoint" of police. Asked afterward, he said he was "not referring to anybody specifically. I was talking about more the climate right now … that has been critical."

During his speech, he highlighted several recent cases that federal prosecutors built with the help of Philadelphia police officers, covering areas such as drug enforcement and wire fraud, and said he hoped to continue having a productive relationship with the department.

His appearance seemed to pass without controversy, a contrast from this winter, when District Attorney Larry Krasner visited the academy to speak with police recruits. After Krasner's remarks, the police union released a letter blasting his speech as "ridiculous and dangerous," saying he had delivered incorrect advice on how to use a firearm. Krasner's spokesman, meanwhile, called those assertions a "total lie" and later released video of the district attorney's speech, in which Krasner discussed the use of police weapons but said he would leave training decisions to the department.

McSwain, who in the past had gained some notice defending conservative causes, seemed eager to avoid any strife. Speaking with reporters after his remarks, he declined to offer specific stances on topics such as safe injection sites or gun laws. As for Krasner, McSwain said that the two met several weeks ago and that "we are trying to find ways, if we can, to work together."