The campaign to show NYPD in a positive light backfired after thousands tweeted their own photos Twitter/KimaniFilm

A Twitter campaign by the New York Police Department to "communicate effectively" with the city's residents backfired when people responded with hundreds of photos of police brutality.

The NYPD official Twitter account had asked its 97,000 followers to send a photo of themselves posing with one of its officers using the hashtag #myNYPD.

While there were a few perfectly fine snaps of tourists posing next to New York's finest and officers helping out the locals, the hashtag was also hijacked by people who posted photos which showed the department in a less than favourable light.

Photos including officers pulling a woman's hair, attacking people with batons and beating up a homeless man were just some of the pictures shared via the MyNYPD hashtag.

By the evening on 22 April the NYPD's Twitter hashtag was the number one trending topic in the US.

The force did not comment on the backlash the Twitter campaign received and – as would be expected – only chose to retweet the more positive aspects from Twitter users.

As well as the feedback from users the NYPD were hoping for, others took to the hashtag to criticise the backlash.

"People are so lame, there's a lot of good cops out there as well," tweeted ‏@annuhk.

Following the social media criticism, NYPD deputy chief Kim Royster said: "The NYPD is creating new ways to communicate effectively with the community. Twitter provides an open forum for an uncensored exchange and this is an open dialogue good for our city."