Noel O'Brien, 67, has been arrested 41 times since 2002 for clashing with authorities

A raging ex-councillor has been jailed after a 16-year campaign of racist, foul mouthed and drunken behaviour against public officials, police and even the magistrate sentencing him.

Widower Noel O'Brien, 67, has been arrested 41 times since 2002 for going on bizarre rants against authorities.

The former Labour councillor referred to police as 'Nazis' and claimed they 'only had one brain cell between them'.

A Polish traffic warden who once tried to give him a parking ticket was charged at by O'Brien who threw her hat on the road and told her: 'Polish b**** - go back to your own country, we don't want you here.'

In his latest brush with the law, O'Brien told a policewoman: 'You are going to be out of a job and working in gay bars in Manchester with your lesbian friend.'

He also challenged two security guards to a fight after they asked to search his bag at a court building saying: 'F****** jobsworths, you have no f****** right - if you need to search it you need a warrant to do that, if you don't have one then you can f*** off.'

At Tameside Magistrates' Court, O'Brien of Haslingden, Lancashire, admitted three charges of using threatening behaviour and was jailed for 24 weeks.

The offences had put him in breach of a suspended jail term imposed last year.

As he was being sentenced O'Brien told the judge: 'It is my court, allow me to speak. You are a good man, your honour, but you don't know what you are doing. This is the ultimate travesty.'

O'Brien, who lost his council seat at Rossendale in 2004, had previously branded the courts as a 'pantomime' and was banned from entering a local estate agents for being abusive.

He was also prohibited from entering council buildings after being served with an injunction in 2011 for ranting at staff and contractors.

He tried unsuccessfully to stand again as an independent councillor but as repeatedly ejected from council meetings and was even escorted by police from a local election count.

The former Rossendale councillor went on a homophobic rant at officers last July in his most recent clash with the law

During one incident, a solicitor had to defend himself after O'Brien began swinging punches at him outside a courthouse.

In another bust up he was wrestled to the floor by security staff when he tried to enter Blackburn College in breach of an order banning him from all campus buildings.

In March last year O'Brien was given a 12 week suspended sentence for racially abusing an Asian taxi driver and refusing to give a breath sample to police who suspected him of drink driving.

At the time he told JPs: 'With great respect Your Worships, you don't know your a**e from your elbow. A curse on you and your family and all your relatives. You people will be judged when you appear before those pearly gates..'

The latest incidents began on July 18 last year when O'Brien left his bag unattended at Lancaster Railway Station and it was moved for safety reasons.

Prosecutor Joseph Connor told the hearing: 'He approached customer service advisor Mark Higginson and said to him "Do you enjoy working on the trains you f****** fat b******?"

Judge Mark Hadfield jailed O'Brien for 24 weeks at Tameside Magistrates' Court

'He became aggressive with Mr Higginson and continued making comments on his weight.

'Police were contacted and they went to speak to him - but he was abusive to them too and said "f*** off, I will f****** eat you."

'He was told to leave the railway station but he continued to tell them to f*** off until he was arrested.'

O'Brien later attended Lancaster magistrates court over the incident on September 12 but he flew into a rage at security staff working at the entrance to the building when they asked him to remove his coat and allow his bag to be searched under routine procedure.

Mr Connor added: 'Growing angry he told the security guards "You f****** jobsworth. You have no f****** right, if you need to search it you need a warrant to do that, if you don't have one then you can f*** off. Let's go outside and have a fight."

'The officers believed they were going to be assaulted. He also called them 'f****** morons, maggots and said they were out of shape and told them he could easily knock them out.

'He was not allowed into court and made his way back to the railways station when he ran into the officers who he had seen in July.

O'Brien's lawyer Trevor Feehily said his client started offending when his wife was diagnosed with breast cancer

'Seeing them, he shouted to them: "Hello officers, you are going to be out of a job and working in gay bars in Manchester with your lesbian friend".

'The officers told him not to speak to them in that way. During this, members of the public were passing by and heard him say to them "She's a lesbian, she's going to come out soon, when are you coming out as a lesbian".

'He was detained by the officers and arrested. In his police interview he denied making any homophobic comments.'

O'Brien's lawyer Trevor Feehily said: 'This man had led a law abiding life until the age of 52. He did a lot of charity work and did a lot in the community.

'In the 1990s he was a lecturer at Blackburn College in special needs education. He was a local councillor in Rossendale and did lots of community work.

'There was no convictions or cautions against him until 2002. This was when his wife was diagnosed with breast cancer and they got told it was terminal.

'He gave up all his commitments to be able to look after and spend as much time with his wife as possible as he didn't know how much longer she had left. That was when he began committing offences.

'He didn't commit again until the sad death of his wife in 2008. This has had a very profound effect on his behaviour and he said it felt as if he didn't care anymore.

'He wouldn't care because of his loss. He has a tendency to talk angrily when he comes into contact with authority figures such as police officers and security guards and traffic wardens. It makes him behave in this way.

'He understands that when he behaves like this there is only one outcome. It is not something he is proud of. The death of his wife seems to have elevated a problem in controlling himself but he has been out of trouble for 6 months.

'He hopes this is will have turned a corner for him. He has a new partner whom he is living with now.'

But sentencing District Judge Mark Hadfield said: 'These offences are fully viable for immediate custody because of your record.

'They were committed over a short period of time after your previous sentence of imprisonment was suspended.

'The offences relating to the statement you made to the police officer was aggravated by homophobic tones.'

O’Brien was also ordered to pay £200 compensation.