A chilling video apparently shows two kneeling, bound Mexican intelligence agents confessing supposed rights violations while surrounded by five masked gunmen pointing machine pistols and assault rifles at them.

A federal official who was not authorized to be quoted by name said on Monday the two men in the video are apparently the two agents of the federal attorney general’s office who went missing on 5 February in the Pacific coast state of Nayarit.

The gunmen bear no identifying marks on their clothes, but Nayarit is dominated by the Jalisco New Generation cartel.

One of the pair reads from an apparently prepared script in which he claims agents and military personnel committed rape, torture and theft.

It was unclear what rank the two had, but the gunmen apparently thought they were undercover intelligence agents, because the script included the line “understand, the fact that we dress up as normal workers doesn’t mean they don’t know who we are”.

However, the attorney general’s office said the two missing agents had been off duty and attending a family event in Nayarit when they disappeared.

It said the two were assigned to the Criminal Investigation Agency, a sort of federal detectives’ bureau.

The video released over the weekend on social media was shocking in part because while corrupt local police have been taped “confessing” and being executed on video in the past, it has seldom happened to federal agents.

In one of the few comparable incidents, in 2004 two agents of the Federal Preventative Police were beaten, doused with paint thinner and burned to death by an angry crowd on Mexico City’s southern outskirts

Those agents had been taking pictures of an elementary school as part of an operation against drug dealing when neighbors became alarmed the men might be kidnappers and attacked them.

The Jalisco cartel, Mexico’s fastest-growing gang, has been known both for its violence and its willingness to attack federal police and even the military.

In 2015, Jalisco cartel gunmen shot down an army helicopter with a rocket launcher, killing 10 soldiers.

The attorney general’s office said no efforts would be spared to find the two abducted agents.

In the script, the captured agents said: “They (the captors) have always respected us as authorities, because they decided to do so, not because they couldn’t harm us” if they wanted to.

The gang appeared to claim it would capture more agents; the script continued: “This will continue to happen to all of our colleagues from other agencies who do the same thing: steal, kidnap and rape hiding behind a government badge.”