Scientists have developed the ultimate lie detector for social media – a system that can tell whether a tweeter is telling the truth.

The creators of the system called Pheme, named after the Greek mythological figure known for scandalous rumor, say it can judge instantly between truth and fiction in 140 characters or less.

Researchers across Europe are joining forces to analyze the truthfulness of statements that appear on social media in “real time” and hope their system will prevent scurrilous rumors and false statements from taking hold, the Times reported.

The creators believe that the system would have proved useful to the police and authorities during the London Riots of 2011. Tweeters spread false reports that animals had been released from London Zoo and landmarks such as the London Eye and Selfridges had been set on fire, which caused panic and led to police being diverted.

Kalina Bontcheva, from the University of Sheffield’s engineering department, said that the system would be able to test information quickly and trace its origins. This would enable governments, emergency services, health agencies, journalists and companies to respond to falsehoods.

“People do believe things they hear on the internet,” she said. “In critical situations, you can instead show reliable information or alert the authorities before things get out of hand.”

Pheme will classify online rumours into four types: speculation, such as whether interest rates might rise; controversy — such as the heated debate over the MMR vaccine; misinformation, where something untrue is spread unwittingly; and disinformation, where false statements are published with sinister motives.

The system works by assessing the quality of information and sources, giving more weight to established news outlets and experts, and looking out for “bots” (computer programs designed to send spam). It will also look for a history and background of users, so that it can spot where Twitter accounts have been created purely to spread false information.

Pheme will then search for sources that can back up or dismiss the information, as well plot how the conversations on social networks evolve, using all of this information to assess whether it is true or false. The results will be displayed to the user on screen, telling people if an untruth is taking hold among the public.

Dr Bontcheva said the final version of the system could be completed within 18 months, but believed that working prototypes may be available sooner. The costs of the project are being met mostly through a European Union grant.

The makers said that the program, estimated to cost about £3.5 million, could have warned Twitter users, such as Sally Bercow, the wife of the Commons Speaker, and the comedian Alan Davies, who were among those who spread untrue rumours that linked Lord McAlpine to child sex abuse. Both were among a number of prominent people who agreed financial settlements with the late peer as a result of the incorrect claims.

The program is a collaboration between five universities — Sheffield, Warwick, King’s College London, Saarland in Germany and MODUL University Vienna — and four companies: ATOS in Spain, iHub in Kenya, Ontotext in Bulgaria and swissinfo.ch.