Jennifer Lopez has failed to obtain a permanent restraining order against an alleged stalker following a blunder by her security team.

The 47-year-old singer-and-actress obtained a temporary protective order to ensure Timothy McLanahan kept away from her and her eight-year-old twins Max and Emme earlier this month, but that has now expired and a judge has dismissed a claim to have it made permanent.

According to TMZ, Jennifer's security team had been handling the incident but didn't show up at court as they felt it would be useless as they couldn't find the man in order to serve him with legal documents, resulting in the judge dismissing the case.

However, the security staff failed to realise the judge could have actioned a process allowing them to publish a notice in a legal newspaper, which would have had the same effect as serving the alleged stalker with the appropriate papers.

If they had done that, it is likely the order would have been granted.

The 'On the Floor' hitmaker now plans to escalate the matter and will use her legal team to obtain protection against the man.

Jennifer's team applied for the initial order after Timothy was reportedly arrested after he drove onto the 'Get Right' hitmaker's property, and the man has also continually bombarded the star with letters and flowers.

According to court reports, Jennifer's security claimed the man has been arrested for threats and firearm violations in the past.

As part of the temporary order Timothy was been requested to keep 100 yards away from the 'Shades of Blue' actress and her children - who she has with her former husband Marc Anthony - as well as their school and her family home.

He was also ordered to stay 100 yards away from Jennifer's car, her job and workplace.Unfortunately for Jennifer this is not the first time she has been plagued by an obsessive supporter, as in 2013 John M. Dubis was arrested for breaking and entering into the star's Hamptons and New York home, and for residing in her pool house for almost one week, despite having a restraining order preventing him from going near the artist.