A new BBC drama was banned from using official Arsenal merchandise after producers submitted a script that portrayed their fans as imbecilic, innumerate criminals.

In one of the opening scenes of By Any Means, first broadcast on Sunday, a semi-literate Arsenal fan shown using his fingers when required to count to five was arrested for a variety of offences. The fan had been led to believe that he had won a competition to meet the players and get a guided tour of the stadium.

He arrived to claim his prize in a plain red and white replica football kit and matching scarf, and walked into an office (located, as eagle-eyed viewers worked out, not in north London but Birmingham) decked with generic football posters, red and white livery and signs reading "Arsenal" and "Emirates Stadium Tours", before being led into an alleyway, arrested and bundled on to a minibus already containing other Arsenal fans.

Jack Quinn, the series' central character – played by Warren Brown, best known for his role as Idris Elba's sidekick Justin Ripley in Luther – tells the miscreant he is "under arrest for supporting Arsenal football club". When the tactic is questioned, a colleague says it was justifiable because "they're crooks". "Worse than that," Quinn counters, "they're Gooners."

As a courtesy, Arsenal had been asked by the programme's producers, Red Planet Pictures, for permission to use branded merchandise and had denied it "within the context of the script". The producers said in a statement: "Red Planet Pictures sought consent from Arsenal FC to use their official merchandise, as is common practice. As this was refused the production team at Red Planet Pictures took the decision to use generic tops which did not feature logos."

The programme, praised by Mark Lawson in The Guardian as "another clever spin on the cop show", attracted 4.1m viewers despite being shown at the same time as ITV1's Downton Abbey.

After the broadcast Brown tweeted: "Apologies @Arsenal fans for last nights Gooners sting! It's only pretend! I used to live in the old Highbury stadium!" Meanwhile James Payne, one of the scriptwriters, explained on Twitter that Arsenal had been picked on because producers "just felt it was the right choice at the time".