In Malmö, around 1,000 people marched from Möllevångstorget to Davidshallstorg, two squares in the city centre, reported regional newspaper Sydsvenskan.
The Stockholm demonstration was organized by Youth Against Racism (Ungdom mot Rasism) and by the youth associations of the Swedish Red Cross and Swedish Save the Children.
The demonstrators were protesting against the police's methods for searching for undocumented migrants under the so-called Reva project, which stands for Rättssäkert och effektivt verkställighetsarbete (Legal and effective execution of policy) and is part-financed by the European Return Fund.
The aim is to increase the number of deportations of illegal immigrants, but Reva has come under fire in recent weeks, sparking heated debates and social media campaigns.
The criticism has mainly focused on the police's ID controls in the Stockholm subway, with critics accusing the police of singling out foreign-looking people for controls and using vague grounds for stopping and searching commuters.
Swedish police are not allowed to stop and search individuals on the basis of their looks, names or the language they speak. In the subway, police have used suspicions of ticket violations as a pretence to stop people and check their IDs, critics claim.
"It is not OK to stop people in the subway just because they have dark hair and dark eyes," one Stockholm demonstrator, 19-year-old Angelina Younadam, told newspaper Svenska Dagbladet (SvD).
"I know three people who have been stopped for no reason. My parents came to Sweden as refugees but I am born here and I am just as Swedish as everyone else and should not have to be violated," said Angelina.
The police have denied that they are singling out foreign-looking people, but on Friday announced that border control officers would stop running ID checks on commuters in the underground as part of their effort to find and deport illegal immigrants.
The debate had taken too much effort, harming other operations, the police explained.
The Save the Children youth association described this as an important partial victory.
"It has strengthened our belief that it is possible to change and affect things as citizens in Sweden," Sara Thiringer of the Save the Children youth association told SvD.
"But the border police will continue to search for undocumented migrants and the inhumane refugee policy will continue," she added.
The Local/nr Follow The Local on Twitter