A Brazilian police inspector has lost his job after using Twitter to criticise women who worked for him.
Pedro Paulo Pinho tweeted that out of the 14 women staff of a Rio de Janeiro police station "only one had the talent, courage and determination needed for police work".
The head of Rio's police, a woman, had him replaced him by a female officer.
Mr Pinho apologised to any women who felt offended but said his tweets had been misinterpreted.
Inspector Pinho said he was angry with one particular policewoman, who had "a history of problems" in the police station.
When she did not show up for work on Monday and he found her tweeting from elsewhere, he started posting himself.
"That made me very angry and I started to give out opinions about public service and explaining that police work demands talent, determination, but without generalising," he told Brazilian news website G1.
But the head of Rio de Janeiro civil police, Martha Rocha, found his actions unsuitable for a police station chief.
In a statement, she said that Mr Pinho was removed because of his "difficulties in managing the human resources at his disposal".
The Rio police chief also justified her choice of replacement, Inspector Monique Vidal, for her "trajectory as a female officer".
Mr Pinho said he had been treated unfairly as his tweets also included praise for a policewoman.
One tweet ran: "And this one, among 14, still young, has no man to match her. When a woman is good at what she does, no one can beat her. But otherwise..."