Robert L. Williams, who said he was “tired of police officers,” approached a police patrol van on Saturday night in the Bronx and shot an officer inside, the authorities said.

Then on Sunday morning, they said, he walked into the nearby 41st Precinct Station House and began shooting again, striking a lieutenant.

Mr. Williams was immediately arrested in a melee at the station house, where a third officer was injured.

[The man who shot up a Bronx precinct was “tired of police officers,” the police said.]

The rampage left the department shaken and touched off a political maelstrom between Mayor de Blasio and police union officials at an already delicate time for police relations in New York.