A French journalist who infiltrated the country’s police force has described a culture of racism and violence in which officers act with impunity.

Valentin Gendrot claims the violence was so frequent it became almost banal and describes one incident where he was forced to help falsify evidence against an adolescent who had been beaten by an officer.

“It really shocked me to hear police officers, who are representatives of the state, calling people who were black, Arab or migrants ‘bastards’, but everyone did it,” he says.

“It was only a minority of officers who were violent … but they were always violent.”

Gendrot also says he was shocked to discover how badly trained and paid police recruits are and how the constant stress and daily hostility and violence they face drives officers to depression and suicide.

The journalist spent almost six months in a police station in one of Paris’s tough northern arrondissements where relations between the law and locals are strained.

In his book, Flic (Cop) published on Wednesday, Gendrot reveals that he was given a uniform and a gun after just three months’ training, and later sent out on patrol.

He says he witnessed officers assaulting youngsters – many of them minors – on an almost daily basis. Gendrot describes a “clannish” system that ensures officers close ranks to protect their own, leading to a sense of impunity.

“They don’t see a youngster, but a delinquent … once this dehumanisation is established everything becomes justifiable, like beating up an adolescent or a migrant,” he writes, adding: “What astonishes me … is at what point they feel untouchable, as if there’s no superior, no surveillance by the hierarchy, as if a police officer can choose – according to his free will or how he is feeling at that particular moment – to be violent or not.

“In my commissariat there were racist, homophobic and macho comments every day. They came from certain colleagues and were tolerated or ignored by others.”

Flic is published by Editions Goutte d’Or, a niche company that produces three books a year. It has been published in extreme secrecy. It was printed in Slovenia and bookshops in France ordered it without knowing the details.

The Guardian is one of three publications – along with Le Monde and Mediapart – allowed to read the manuscript in the offices of the publishers’ lawyer and interview the author.

Gendrot, 32, from Brittany, worked on local newspapers and radio after graduating from journalism college and carried out several undercover investigations – including working on a Toyota production line and in a Lidl supermarket – before joining the police.

“I wanted to go undercover in a police commissariat so I could show what we never see. In France there are two big taboos: police violence and malpractice and police suicides. In France, people either like the police or detest them. I thought it had to be more nuanced,” he told the Guardian.

“This book is not anti-police. It’s a factual account of the day-to-day life of a police officer in a difficult district of Paris.”

Gendrot joined the Police Nationale as an adjoint de sécurité – a contracted and salaried “special constable” – in 2018 using his real name.

A Google search reveals Gendrot has no great internet or social media footprint, but in any case, he says, the police recruiters did not delve into his background. He did change his round spectacles to look less “bookish”.

After three months’ training at police school in St-Malo, in Brittany – he finished 27th out of a class of 54 – Gendrot was posted to a police psychiatric unit for 15 months before landing a job at a station in Paris’s 19th arrondissement.

Here, as officer number 299145, he was issued his uniform and pistol. The station covers one of Paris’s grittier districts with 190,000 inhabitants and a particular problem with juvenile delinquency, drugs and prostitution.

On one of his first patrols, he describes how a colleague beat up a teenage migrant in the back of the police van. “Two weeks in uniform and already I’m complicit in the beating up of a young migrant,” he writes. The incident was never written up. “What happened in the van, stays in the van,” he notes.

On another occasion, Gendrot and his patrol were sent to investigate after a complaint about youngsters with a speaker. When his colleague humiliated one of the youths and the youth responded verbally, the youth was beaten, arrested and charged.