Watch the footage taken by Paul Lewis during his standoff with City of London police

guardian.co.uk

It felt like a minor terror alert. Four security guards were watching me, whispering into microphones on their collars. A plainclothes police officer had just covered my camera lens, mentioned the words "hostile reconnaissance" and told me I would be followed around the city if I moved.

Two uniformed officers were on their way to stop and search me under section 44 of the Terrorism Act, he said. Special Branch, the police counter-terrorism unit linked to the secret services, had been informed.

It had taken less than two minutes from the first click of my camera. My subject was the Gherkin, an iconic London landmark photographed hundreds of times a day and, as it turned out, the ideal venue to test claims from a growing number of photographers claiming they cannot take a picture in public without being harassed under anti-terrorist laws.

This was the first week in which police had been ordered to take a more sensible approach to street photography. By Monday morning all 43 police forces in England and Wales had received a memorandum warning them that officers were "confused" over stop and search powers.

"Officers should be reminded that it is not an offence for a member of the public or journalist to take photographs of a public building and use of cameras by the public does not ordinarily permit use of stop and search powers," the circular said.

Andy Trotter, chief constable of the British transport police, who drafted the guidance for the Association of Chief Police Officers, said photographers should be "should be left alone to get on with what they are doing".

The shift in policy was a direct response to weeks of negative media reports surrounding photographers, amateur and professional, who said they were being unfairly stopped, usually under section 44, a law allowing officers to stop and search without need for "suspicion" within designated areas in the UK.

While the use of anti-terrorist stop and search powers has fallen in recent months, a succession of high-profile incidents involving the use of the legislation against photographers has embarrassed senior officers, who privately concede that the rank and file are misusing their powers on the ground.

Recent examples include Jeff Overs, a BBC photographer who told the Andrew Marr Show he was stopped under suspicion of terrorism reconnaissance while photographing St Paul's Cathedral, and Andrew White, an amateur photographer questioned by two police community support officers for photographing Christmas lights in Brighton.

In April two Austrian tourists were forced to delete their shots after being stopped by police in Walthamstow; and Alex Turner, an amateur photographer, was arrested under section 44 after taking images of a fish and chip shop in Kent.

Earlier this week Grant Smith, an architecture photographer, was apprehended under section 44 by City of London police while photographing Sir Christopher Wren's Christ Church, around the corner from the Gherkin.

Smith, a critic of the stop and search policy, had been wearing a badge that read "I am a photographer not a terrorist" when police approached him. To top it off, when an ITN London Tonight crew arrived in the area to cover the story they reportedly found themselves subject to similar treatment.

When I arrived at the Gherkin at 11am yesterday I was stopped by a security guard as I walked around the side of the building. When he told me I had strayed on to private land, I returned to the pavement, but declined his repeated requests to show him the images on my camera.

Back on the pavement, a second security guard informed me that under "anti-terrorism" I was permitted to photograph or film the top end of the building, but the lower half, which included the reception area, fire exits and security cameras, was off-bounds.

Seconds later the City of London plainclothes police officer appeared on my left. Clearly he was not keen on my filming him, but he did not suggest there was any law that could stop that. I said that while I did not want to be difficult I was aware that I did not have to disclose my identity or tell him what I was doing.

After a brief dispute over his ID, the officer asked what I was filming and I replied that – while I did not want to be difficult – I did not have to tell him who I was or what I was doing. I felt adolescent saying it, but I told him that was my "right".

Looking a bit bewildered, the officer called Special Branch on his mobile phone. They sent two other City of London police to come and search me under section 44 and, while we were waiting for them, the plainclothes officers indicated that I was not the only person to be questioned in this way.

"People are very sensitive," he said. "People will take tourist photographs but other people have a conduct, or manner, which raises the [security] guys' suspicions."

I had some sympathy for the PC, who it turned out had been at the Gherkin by coincidence. He seemed to have been as much a victim of overzealous security guards as me. He was, he said, only doing his job.

But while both of us were at their whim, I pointed out that it was he, not security, who had notified Special Branch. When we spoke on the phone the next day the officer stressed that he was just doing his duty.

The two uniformed City of London police officers who arrived shortly after seemed determined, from the outset, to look at the images on my camera. Their insistence seemed to be stretching their powers to the limit. Section 44 does not specify that officers have the power to look at images, although it does empower them to search anything "carried" by the person they have stopped. Police have interpreted the law to mean that they can view images to establish whether they are "of a kind which could be used in connection with terrorism".

To futher complicate the matter, police require a court order to view images captured by a journalist (in fairness, in my case it was not until the end that they knew I worked for the Guardian).

Anna Mazzola, a civil liberties lawyer who advises the National Union of Journalists and whom I consulted, told me that in general if police can view anyone's images, they can only do so in "very limited circumstances".

This hardly seemed an exceptional circumstance, and I thought there were no obvious grounds to suspect there could be terrorist material on my camera. They were good enough to call Special Branch – twice – to check the rules.

By the time they looked at my images, threatening me with arrest for obstruction if I didn't show them, the officers had stopped a second photographer. My colleague, Martin Godwin, had been spotted across the road, where he was using a long lens to take pictures of me. They also stopped him under section 44 and looked at his pictures.

City of London police have since defended the officers' actions in a statement: "Public safety is our first priority. We responded to legitimate concern from our community about the behaviour of an individual close to an iconic building and acted accordingly. According to legislation, digital images may be viewed as part of a search under section 44 of the Terrorism Act 2000 provided viewing is to determine whether the images are of a kind which could be used in conjunction with terrorism.

"In this case, the individual refused to explain what he was doing, so officers had to carry out further investigation on the street."