FACEBOOK has invented a creepy system that suggests new friends based on who you've stood near to.

The social network could use the feature to match you up with people on the train, in your office or at a nightclub – even after you've left.

2 Facebook has invented a terrifying system that could track how close you are to other users

It was revealed in a patent won by Facebook in the USA, and spotted by The Mirror.

The feature works by using existing technology inside your smartphone.

This includes common features like Bluetooth, or Near Field Communication (NFC) – the tech that powers contactless Apple Pay or Android Pay payments.

It could also measure signal strength, allowing Facebook to pinpoint exactly how close you are to another person.

2 Facebook has moved from cybersecurity blunder to cybersecurity blunder in 2018 – and shows no sign of slowing Credit: Getty Images - Getty

Mark Zuckerberg walks inside Capitol Hill to testify to US Senate on Facebook privacy scandal

The application reads: "Under conventional approaches, a first user who desires to connect with a second user usually knows the second user's name, contact information, or at least has some level of mutual connection with the second user."

Facebook says that if a user forgets to obtain another person's contact info then it "can be challenging or inefficient" to find that person on the app later.

"During their meeting, the first user and the second user forgot to obtain each other's full names and contact information," Facebook explained.

"Furthermore, the first user and second user do not have any mutual connections that are readily recognisable or apparent to each other.

"Thus, the opportunity for the first and second users to connect can be lost."

Facebook added: "These and other similar concerns can reduce the overall user experience."

Facebook compares this to normal ways of finding friends – as if that makes it any less creepy.

"People often utilise computing devices or systems to access, engage with, or otherwise interact with social networking services," Facebook writes.

"For example, a user can use his or her laptop computer to search for and find a childhood friend via the social networking service."

Facebook privacy gaffes revealed We've seen three major security blunders from Facebook this year... Back in March 2018, Facebook was forced to reveal a major gap in its cybersecurity that allowed app makers to steal data on millions of users without their permission.

And in late September, Facebook admitted that hackers had gained complete access to tens of millions of accounts.

Then in November, hackers posted private messages from 81,000 hacked Facebook accounts – and promised to sell info for 120million accounts at 8p a pop.

But simply searching for Facebook friends obviously isn't enough.

Facebook uses lots of data to decide who to recommend for your friends list.

For instance, information from your phone contacts or Instagram account can be used for recommendations.

Facebook will also check to see if you regularly attend events with someone, or share common friends with a person.

This system is designed to make sure Facebook isn't recommending complete strangers to you.

But Facebook has a bad reputation when it comes to privacy, and some users might find this latest patent a step too far.

After all, this feature would be a dream come true for stalkers, who could find info about their prey just by lurking near them at a bus stop.

It also raises child safety concerns for the same reason.

MOST READ IN TECH IS IT BOT IN HERE? Terrifying Japanese robot standing 18METRES high moves for 1st time APPSOLUTE MADNESS iPhone WARNING over 4 dangerous iOS apps that drain your battery SICKOS EXPOSED TikTok suicide clip that traumatised kids was 'attack plotted on dark web' X FACTOR How to buy new Xbox consoles TODAY as pre-orders go live worldwide NOT 'APPY Facebook and Instagram 'could SHUT DOWN in Europe' if EU bans US data sharing I-SPY Teens worried as new 'app spying' notification shows TikTok turning on iPhone's mic

The good news is that patents don't signal intent: Facebook may never actually use its creepy friend-finding tech.

Companies sometimes ask for patents as a safe way of securing an idea – in case they ever want to use it in the future.

In other cases, companies will create patents as a form of aggression, simply to block rivals from creating a similar type of technology.

Patents can also be a valuable source of income: Facebook could charge other social networks licensing fees to use its ideas, while never actually building the technology itself.

A Facebook spokesperson told The Sun: "We've often sought patents for technology we never implement, and patents should not be taken as an indication of future plans."

What do you think of Facebook's latest creepy idea? Let us know in the comments!

We pay for your stories! Do you have a story for The Sun Online news team? Email us at tips@the-sun.co.uk or call 0207 782 4368 . We pay for videos too. Click here to upload yours.