By Victoria Harrison
Despite its violent reputation Rio scored highly for friendliness
A study published in the New Scientist magazine says the Brazilian city of Rio de Janeiro is the friendliest in the world.
A team of social psychologists from California spent six years assessing the reactions of the local populations of cities around the world to different situations.
And now they have finally published their list of the good and the bad.
But what makes one city more friendly than another?
The psychologists, from California State University, say it has got more to do with the environment we live in than our cultural or ethnic background.
1. Rio de Janeiro, Brazil
2. San Jose, Costa Rica
3. Madrid, Spain
They carried out a study into the way locals treated strangers in 23 cities around the world.
The team conducted their research through a series of "helpfulness" tests, such as dropping pens, feigning blindness or an injury and leaving stamped addressed envelopes in the street.
The results showed that the poorer, less stable cities generally had the friendlier, more open populations.
Rio de Janeiro in Brazil - more often known for its violence and crime - came out top.
Latin American cities in general fared well, as did Spain's capital Madrid.
But cities such as Kuala Lumpur, New York, Singapore and Amsterdam were deemed the least friendly.
Locals here helped out the researchers in less than half of their cases.
The study concluded that people were more helpful in less dense and more laidback cities.
The psychologists say their research supports the theory of "stimulus overload", which states that in overcrowded, fast-paced cities people often deal with their surroundings by ignoring emergency situations and depersonalising strangers.