The UK Independence Party police and crime commissioner candidate says he shared controversial posts on social media, including an article celebrating an African state banning Islam, with other Facebook members to see their reaction to particular issues.

David Moreland denied he is a racist, as another candidate in the contest raised concerns about the posts, which also included a picture merging the European Union flag with a Nazi swastika.

He said: 'Anything forwarded to other Facebook members is to see what, if any, reaction they have that particular issue [sic], but I am in no way racist.'

He said an earlier post pushing a petition to stop mass immigration from Bulgaria and Romania had been posted when his laptop had been 'professionally hacked'.

He said the posting on Bulgarians and Romanians was 'under no circumstances written by me in any way shape or form'.

But Lorne Green, the Conservative candidate for Police and Crime Commissioner, said: 'For anyone in public office to share these views on social media is concerning. The police and crime commissioner is elected as the democratic link between the public and the police, they are expected to represent all communities.'

Independent candidate Stephen Bett said that without seeing the posts he did not want to comment, but having met Mr Moreland only a couple of times he did not give the appearance of someone who was racist.

Green candidate Martin Schmierer said: 'Without having seen all the posts I feel unable to comment on them specifically. However, it's important to remember that the role of a police and crime commissioner is one of considerable responsibility. The postholder should represent the entire community and seek to heal divisions, not create them.'

Liberal Democrat Jacky Howe said the idea of the police and crime commissioner was to represent the general public and they were trying to attract people from other cultures to the police force. Labour candidate Chris Jones is also standing in the contest.