The EU is facing calls to rethink its cooperation with Sudan on migration flows after scores of refugees were whipped, fined, jailed and deported from Khartoum last weekend following a peaceful protest over a huge rise in visa processing fees.

About 65 asylum seekers – the majority from Ethiopia and some from Eritrea – were lashed 40 times on their backs and the back of their legs with leather whips, lawyers told the Guardian.

The detainees were also handed fines of more than $800 (£645), and 40 were deported immediately, after being arrested in what witnesses say was a violent police attack on a peaceful protest.

The incident raises concerns about the strength of human rights conditions attached to more than $100m of migration-related aid earmarked for Sudan by the European commission.

The MEP Barbara Lochbihler, vice-chair of the European parliament’s sub-committee on human rights, said the EU should launch an inquiry. “The EU must voice clear criticism on the recent incidents, conduct a thorough investigation, try and help the people concerned, and draw the necessary conclusion: if projects such as Better Migration Management carry the risk for the EU to become complicit in human rights abuses, which I believe to be true, we should pull out immediately.”

Judith Sargentini, an MEP on the European parliament’s development committee, said she would be asking a question about the issue in parliament this week.

“Honestly, when we see Ethiopian refugees being harassed, lashed and thrown out of the country, we have to wonder whether we are not legitimising the Sudanese behaviour with our funding,” she said.

“The [EU] training for immigration and border management does not seem to be working very effectively yet,” she added. “I can imagine that [Sudan’s president Omar] al-Bashir thinks he has more manoeuvring space because the EU money is coming.”

A human rights worker in Sudan, who asked not to be identified for security reasons, said the regime’s brutality towards refugees had worsened in the last year as EU cooperation had increased.

“The crackdown on migrants and refugees has escalated,” the activist said. “The government feels empowered to do whatever they want. They think they can get away with human rights violations like this. They see them as goodwill gestures to the EU to show they are controlling the flow of migrants.”

The commission has pledged nearly €2bn to countries taking steps to curb migration to the EU in an emergency trust fund for Africa. Sudan separately received €100m of funds last year to improve border security and address causes of forced displacement.

Sudan is also benefiting from €40m (£34m) set aside under the Khartoum Process’s Better Migration Management scheme to help restrict refugee flows in central and east Africa.

These revenues could be used to pay for military and police border management posts, surveillance systems, transport vehicles, communications, protective police gear, IT systems, infrastructure and power supplies.

EU officials deny that any revenues will go to government forces such as the Rapid Support Forces (RSF), border guards on Sudan’s Libyan frontier linked to the notorious Janjaweed militia.

The RSF commander Mohamed Hamdan, known as Hemedity, last year demanded that the EU replace vehicles and weapons lost while his force rounded up 20,000 migrants.

“We are hard at work to aid Europe in containing the flow of migrants, and if our valuable efforts are not well appreciated, we will open the desert to migrants,” Hemedity said.

But it was a Khartoum court’s police that whipped and deported the asylum seekers, not the RSF. Most of those arrested were Oromo people fleeing ethnic and political repression. The court case that followed also fell short of international standards, according to local lawyers.

“It was not a fair trial,” claimed Montasir Mohammed, a lawyer for two of the arrestees. “No legal representatives were allowed to attend the court, and the men were not given a chance to appeal. The flogging was administered immediately after the court hearing. No doctors have been allowed to see them.”

The asylum seekers had been arrested last Friday when police dispersed a sit-down protest by 300-500 people outside the Ethiopian embassy in Khartoum. Eyewitnesses say officers attacked protesters with long wooden batons and tear gas canisters, provoking a dangerous stampede.

One witness, who asked to remain anonymous, said: “People were quietly sitting down on the pavement when suddenly the police came with big sticks and started to beat people. Then the military police arrived and fired teargas.

“People started to run but there was no way to escape except by jumping over a cemetery wall. Then it collapsed because so many people were jumping and pushing on it. All the people trying to escape were badly beaten as they ran, even me. It was painful.”

Use of overseas aid for this kind of political repression is “explicitly excluded” under criteria agreed by the OECD’s Development Assistant Committee last year.

The EU says it has not yet given any funds to the Sudanese government and that monies have been directed through international agencies.

However, a parliamentary delegation to Sudan in December said while EU stocks might not yet have arrived, it was clear that its funding projects “will be providing equipment to national police across the region for border control”.

Sudan is considered a key transit country for migrants to Europe. An estimated 30,000 people travelled through it on the way to Italy (pdf) in the first 11 months of 2016.

Around 500,000 refugees from Eritrea, Ethiopia and Somalia are currently thought to be in the country.

Last week, a British parliamentary inquiry warned that in Sudan, “the European Union’s long-held reputation as a human rights standard-bearer is in danger of being sacrificed at the altar of migration”.