The Tweet began as if they were old friends: “Hi, Demirtaş! This is Inge from the Norwegian newspaper VG,” Ingeborg Amundsen wrote from Oslo.

“I’m wondering: How will you become president when you’re locked up in a prison cell? And do you think the ruling president sees your candidacy as a threat?” Amundsen continued.

Selahattin Demirtaş replied (in a lumpy translation): “If I receive enough votes, I will be the president even if I’m in prison. But I cannot campaign from inside here as I’m a hostage. That’s the problem. If I were out there, I’d be much more capable. Yes, the AKP and (President Recep Tayyip) Erdoğan are most afraid of me, and that’s why I am here.”

The exchange was one of 60 question-and-answers as Demirtaş used Twitter to reach beyond the walls of Edirne prison to journalists and his legion of supporters.

Demirtaş was detained in November 2016 on charges of terrorism. The state threw the book at him, accusing him of multiple violations in his speeches. But so far it has not managed to convict him in court. And he has been rather productive in prison.

He has published a book of short stories, painted paintings, and written a song that combines the elements of Turkish pop music with instrumentation of folk music. Sympathetic singers recorded the song, “Don’t be afraid,” and his wife Başak posted it on the Web.

But it is his campaign as the People’s Democratic Party (HDP) candidate for the June 24 election that is getting the attention. In Diyarbakir, people discuss Demirtaş’s Tweets in the çay ocakları (tea houses), said Mahmut Bozarslan, a well-connected journalist in the city.

“Many people wait for his messages,” Bozarslan told this reporter.

The Erdoğan government has trampled on civil liberties in so many fields that one wonders why it allows an alleged terrorist to mobilise his supporters from prison.

Doğu Ergil, a retired professor of politics from Ankara University, says there are still civil servants in Turkey who claim to uphold the rule of law and fair elections.

“They are saving face,” Ergil said. “They are saying ‘look, he’s a criminal, he’s in prison for his crimes, but we are giving him a fair chance’.”

In addition, Turkey knows the world closely watches how it treats the leaders of its Kurds, approximately 20 percent of the population.

The HDP invited journalists to file questions to #AskDemirtas on Twitter by June 6. The questions were printed out and taken to Demirtaş by his lawyer. As the prison does not allow the lawyer to bring in a laptop, Demirtaş wrote his replies in longhand, in neat handwriting, and party workers posted them on Twitter, sometimes translating them as well.

Selin Girit of the BBC asked what would happen to Demirtaş’s candidacy if he were to be convicted in an upcoming judgement. Demirtaş replied it would not derail his campaign as he would appeal any conviction.

In a second Tweet, Girit asked what Demirtas thought of “the Supreme Electoral Council’s decision to relocate polling stations in several southeastern towns and Erdoğan’s call on the police force to secure ballot boxes”.

Demirtaş replied the State was “creating obstacles’’ for HDP voters. “The ballot boxes being relocated are predominantly from areas that voted for the HDP in previous elections,” he added.

A journalist from Van, Ilhan Siyahtaş, asked Demirtaş what he would do about the persecution of journalists. More than 150 journalists are now in jail and hundreds have lost their jobs in Erdoğan’s crackdown on the media.

“Journalists who have been detained, charged or dismissed unjustly will be compensated,” Demirtaş replied. “We are going to ban media bosses from having ties to the government and we’re going to ban media monopolies.”

This reporter asked Demirtaş how he would re-assure Turkish nationalists that they have nothing to fear from HDP plans to upgrade the Kurdish language and grant autonomy to the Kurdish-majority provinces.

Demirtaş said his plan was for everyone to be educated in Turkish as well as in their mother tongue. “This will only enrich our culture, not weaken it.”

He added Kurdish provinces would not achieve more autonomy than others. “The authority of all municipalities in Turkey will increase in the same way (so) regional or ethnic differences/discrimination will not emerge.”

Demirtaş’s success in propagating his views from prison has annoyed Erdoğan. A few days after the Twitter “press conference” the president said he would change the election rules to preclude the candidacy of detainees.

“It is argued that (Demirtaş) has not been convicted; he is only imprisoned. But the reason for imprisonment is very important,” Erdoğan told a rally in Trabzon.

But what really vexes Erdoğan is that Demirtaş refuses to play the role which the president has assigned to him.

The 45-year-old civil-rights lawyer from Elazığ province has managed the rare feat of championing Kurdish rights while being acceptable to ethnic Turks at the same time.

Professor Ergil said there are two reasons. First, “Demirtaş has renounced violence in every way.” Second, “he defends Kurdish identity as a value which is not necessarily against Turkish-ness.”

Ergil sees Demirtaş as advocating a Turkish identity that has several sub-identities, just as the late Armenian leader Hrant Dink called for the acceptance of Armenian identity.

“Just like Hrant Dink did, Demirtaş is saying “look, if you construct Turkish identity by excluding the Kurds (or Armenians), then this country will never have unity and peace of mind’,” Ergil said.

Ergil is not alone in seeing Demirtaş as an imprisoned moderate. The two leading challengers to Erdoğan in the election, Muharrem Ince and Meral Akşener, have called for Demirtaş’s release.

Both Ince and Akşener are regarded as nationalists. Akşener has a hard-right background. That they spoke up for Demirtaş shows they know their supporters don’t see Demirtaş as a threat. What is more, they know the voters they are trying to win over don’t see him as a threat either.

Erdoğan insists Demirtaş is a terrorist, but most of Turkey does not believe that.