German Green Party legislator Volker Beck was temporarily detained in Turkey on Sunday after attempting to stop the arrest of a gay rights supporter who wanted to read a statement at the banned closing rally of Pride Week in the centre of Istanbul.
Beck was released again soon after.
The statement protested the ban of the event, saying "Those who banned our march used 'society's sensitivities' as an excuse. But what's being guarded is not society's but the government's sensitivities."
"Society is none other than us," the statement went on. "What's being banned is our attempt to voice our longing to exist as proud people of this world, our demands, peace, justice, and equality."
Green Party Member of the European Parliament Terry Reintke said two of her German staff had also been detained, despite her trying to prevent the police action.
"The police were very aggressive," she said.
What happened to the two Germans later was not immediately clear.
At least 19 people had been detained throughout the day, including several foreigners, with eight activists remaining in custody, organizers said.
"Police snatched my passport and shoved me," Beck said, adding: "What we have seen here was a massive and arbitrary police attack."
According to the politician, the conduct of Turkish police was not commensurate with a closer collaboration between Turkey and the European Union.
While the EU had to keep its doors open for a democratic Turkey, President Recep Tayyip Erdogan was "moving two, three steps away from this goal each day," Beck said.
"For a cooperation or a close friendship this is simply not a good basis," he added.
The arrests came after dozens of Turkish police officers had been deployed around Istanbul's Taksim Square on Sunday to stop public displays planned by supporters of the banned gay pride parade.
The Istanbul Governor Visap Sahin had banned the parade, which has been ongoing for more than a decade attracting tens of thousands of people each year, citing security concerns.
Police had set up water cannon and blocked side streets off Istiklal, the 1.4 kilometre central high street.
They later used tear gas to disperse both the gathering crowds of gay rights supporters and journalists on reporting duty.
Trans Pride, which was held a week ago, was also dispersed by riot police.
Last year's parade was also disbanded after police used tear gas and water cannon to disperse crowds because of the overlap with the Islamic holy month Ramadan.
Amnesty International and the Council of Europe Commissioner for Human Rights, Nils Muiznieks, condemned the ban on the march, with both saying that the Turkish government had "to take all necessary measures to ensure the safety of its participants."
The pride events in Istanbul take place just weeks after a suspected Islamic militant shot up a gay club in Orlando, Florida, killing 49 people.