“The only things that the United States has given to the world are skyscrapers, jazz, and cocktails,” once wrote Federico García Lorca. “And in Cuba, in our America, they make much better cocktails.”

The residents of Lorca’s hometown of Granada may now dare to add Twitter to that list. The California-based social network has become something of a specialism for the Spanish city, which now proudly promotes Jun, a local town pioneering Twitter as a way of administering its public services, and hosts an annual conference dedicated to Twitter.

Mayor José Antonio Rodríguez Salas has been experimenting with technology to improve civic engagement since 1999, starting with software the council built itself, and later moving to virtual communities and social media. When I first meet him on a blistering Andalucian summer day, he is standing in the shade with a huddle of townsfolk overlooking a roundabout. The centrepiece of the roundabout is a large obelisk, decorated with a Twitter mosaic, and a collection of cement handprints that include the former Twitter CEO, Dick Costolo.

Dick Costolo making his mark on Jun Photograph: PR

‘We now do our paperwork on Twitter’

The mayor jokes that Twitter has enabled them to eliminate the bureaucracy brought in by the French. “Twitter has created the society of the minute – very quick questions and very quick answers. We now do our paperwork on Twitter,” he says. “But this is an important point, because who values the work of the people at city hall? The street sweeper? The cleaner? We decided that everyone would have a Twitter account so that they could see that people value their work.”

We decided that everyone would have a Twitter account so that they could see that people value their work José Antonio Rodríguez Salas

Salas has been pushing all 3,500 Jun residents to join Twitter. Six hundred residents have had their accounts registered at the town hall so far, and are using it to book rooms at the town hall, make doctor’s appointments, report crimes or street lamps that need fixing and tweet about school lunches. How has this gone down with Jun’s less technophile residents?

Elena Almagro was cleaning floors when she was nine, and didn’t learn to read or write because her family were too poor to send her to school. Now in her 60s, Elena says she never thought she would be able to use Twitter when the mayor started to encourage her. “He said I should enrol on a training course, and I thought I was visiting the moon when I saw all the computers and equipment in there,” she said. Encouraged by her nine-year-old grandson, they both learned Twitter and decided it would be useful. She tweets during town meetings, she says. “And when I tweet to the mayor, he answers back. It makes me feel my tweets matter. I thought old people couldn’t learn how to use this but we can. There was a man of 90 in the training centre! And I’ve been using it to tweet about herbs and recipes.”

‘When I enrolled on the training course, I thought I was visiting the moon’ Elena Almagro

Jun’s streetsweeper also says he has had a new lease of life through the scheme. His streetsweeping twitter persona @barredorajun has become something of a town celebrity. “I can feel how people value my work and they congratulate me when I have done a good job,” he says. Does it worry him that he might get complaints too? “The fact that people tell you you have done something badly is not necessarily bad – it means you have to improve something. But not many people tell me I have not done my job properly.”

The mayor is clearly proud of his work, which is the culmination of many years trying to find technologies that would cost the council less and make communication with residents more direct. He says that efficiencies in cutting bureaucracy have enabled Jun to cut its police force down from four to one officer, who can respond to everything from a car accident to a neighbourly dispute through Twitter. What of those who can’t or won’t use the internet? Are they disenfranchised?

“Even old people who find it hard to adapt have been trained to use Twitter,” he said. “If you go to city hall you won’t find anyone queueing – they have all the information they need. And Jun has wifi access throughout and free internet connections in the training centre.”

Jun’s streetsweeper, @barredorajun, has become a town celebrity Photograph: The Guardian

He is adamant that there is no inherent risk in outsourcing local government functions to a private American company. “We passed a law that we would exploit any free resource, private or public – the important thing was that they were free. The characteristics of Twitter made it the best platform – immediate and efficient.” This is, he says, “mutual visibility” for the authorities and the citizens.

This experiment by Salas was up and running for two years before Twitter decided to investigate in more depth, with Twitter’s chief data scientist and associate MIT professor Deb Roy, visiting earlier in 2015. “There are those who assume Twitter is lightweight and fun, and Jun shows that there is that side too – what’s available at the town bar, or what the kids are doing,” he said. “But one of the unique characteristics of social media being built on top of the internet is an almost superhuman distribution. Talking is a very natural communication act.”

Salas says Jun has been able to cut its police force down from four to one officer Photograph: The Guardian

Roy referenced Socrates, who was concerned that the rise of text would lead to the death of critical oration and debate. “The idea that text is dead words, with a fixed authority that can’t be questioned – Socrates did have a point. But the affordances of social media are actually closer to a written form Socrates would have been happy with.”

What of those who can’t or won’t engage?

If Jun is a model for a more fluid, immediate democratic form of local government, is it a concern that some proportion of the population will always be unable or unwilling to engage?

“Looking at how we scale this to a larger community, the potential downside is that if we think those who are digitally represented are the only people we have to worry about, then we aren’t thinking about all the people who can’t or won’t. They become invisible. So we need to look holistically at this,” said Roy, pointing to wider challenges globally where the cost of devices and connectivity, despite decreasing, is prohibitive for many, while a further billion people in the world fall below the functioning literacy rate.

Jun, he said, is the exception rather than the rule, with a very committed and technologically confident mayor who has pursued this project for 16 years. He has ensured that Twitter has replaced paperwork but not human interaction; the town hall still buzzes with people and he is very visible in the town. Recently re-elected, it also doesn’t seem to have done his standing any harm in the community. Roy and his researchers have been exploring how the Jun project could be scaled up, looking at Chicago, New York, San Francisco and in Boston, where MIT is based.

But in this complex intersection of ethical, political and social issues, is there enough public debate both inside Twitter and in the wider industry?

“There’s constant dialogue internally, and a lot of public engagement,” said Roy. “But it’s important to step back and say that as a species we constantly create technologies that change our behaviour. We have to remind ourselves that we don’t have all the answers, and continue to have that conversation so that we learn. In that sense perhaps that can never be enough debate, not just as Twitter but at all these tech companies who interact, and the government.”