The revelations over secret Facebook groups popular with US Border Patrol agents were eye-popping.

A constant stream of racist, sexist and violent images persisted for years, reporters revealed. Days later, officials said those responsible for posts were previously investigated, with unclear results.

Then, in testimony on Wednesday, Border Patrol Chief Carla Provost acknowledged she herself was a member of one of the groups, and had been active since at least autumn 2018, according to images published by The Intercept.

Her reason for involvement in the group was to evaluate “how I am representing my workforce”, she told lawmakers in a hearing about oversight within her agency.

Ms Provost sighed deeply. “I didn’t think anything of it at the time,” she told the House appropriations subcommittee, and said she was unaware about the nature of the posts until ProPublica published a report on 1 July.

'Dangerous' overcrowding of migrants in US border facilities Show all 6 1 /6 'Dangerous' overcrowding of migrants in US border facilities 'Dangerous' overcrowding of migrants in US border facilities Photos of detained migrants crowded into cells at the US border - with one holding up a sign reading simply "help" - have been released as part of a new report warning of "dangerous" overcrowding. The memo was sent to the Department of Homeland Security by its Inspector General, containing photos taken at border facilities in the Rio Grande Valley over a week in June DHS/OIG 'Dangerous' overcrowding of migrants in US border facilities Eighty-eight adult males held in a cell with a maximum capacity of 41, some signalling prolonged detention to OIG Staff on June 12 DHS/OIG 'Dangerous' overcrowding of migrants in US border facilities Overcrowding of families observed by OIG on June 11, at a border patrol facility in Weslaco, Texas DHS/OIG 'Dangerous' overcrowding of migrants in US border facilities Migrant families overcrowding a border patrol facility on June 11 in McAllen, Texas DHS/OIG 'Dangerous' overcrowding of migrants in US border facilities Fifty-one adult females held in a cell designated for male juveniles with a capacity for 40 at Border Patrol’s Fort Brown Station DHS/OIG 'Dangerous' overcrowding of migrants in US border facilities Migrant families overcrowding a border patrol facility on June 11 in McAllen, Texas DHS/OIG

The posts contain caustic remarks about the deaths of migrants, sexually explicit images and xenophobic comments.

Her admission raised a question: why did she not use her membership in the group to instead measure cultural sentiment among agents, attitudes about migrants or possible concerns she could address at the top?

“She either missed it from failure to effectively do her job or actively avoided thinking about it,” Josiah Heyman, director of the Inter-American and Border Studies centre at the University of Texas at El Paso, said on Thursday.

Part of Ms Provost’s duties is to visit facilities and meet agents, where front-line supervisors may downplay realities of a recruiting and morale crisis.

Facebook, then, could provide an unvarnished look at how agents view themselves and their duties – or in this case, watch troubling cultural issues rise to the surface as the agency faces intense scrutiny.

Ms Provost looked for candid words about her performance, Mr Heyman noted, “but she manifested no curiosity about candid things being said in other regards”.

More than 60 active and eight former agents are being investigated for their involvement in the group, Associated Press reported.

Some posts questioned the authenticity of a photo of a drowned migrant man and his young daughter.

Another showed a crudely doctored photo of Alexandria Ocasio-Cortez performing forced oral sex on Donald Trump.

Mike Pence visits migrant detention centres at the US-Mexico border

Customs and Border Protection, the agency that includes Border Patrol, did not return a request for comment about why Ms Provost did not use the group in a manner that could have prevented the organisation’s latest black eye.

In her testimony, Ms Provost said she is “as outraged as everyone else”.

She “condemned” the posts in a message to the agency, launched investigations into agents who posted or responded to posts and turned over her passwords to agency oversight officials, who told her she had logged on to Facebook nine times over a one-year period, mostly to keep up with friends and family.

Yet Ms Provost said the posts at the private group page “I’m 10-15,” after the law enforcement code for “aliens in custody”, were not indicative of cultural rot within the Border Patrol.

She called offenders “a few bad apples” among about 20,000 agents. The group for current and former agents included about 9,500 members, though other groups exist.

Mr Heyman suggested the posts indicate cultural and attitude problems that he said officials have been reluctant to address.

He led a survey of about 1,100 migrants deported to Mexico, and nearly a quarter of respondents said they were verbally abused by US immigration agents, primarily Border Patrol. 11 per cent reported physical abuse.

“The posts are very consistent with that we found,” he said. It’s not just ‘this person is out of status, and I need to apply law ... but I hate this person, I want to humiliate this person’.”