Standing on a wall in front of the railings outside the courthouse, the women, two French and the other German, shouted: "Free Amina," in support of a young Tunisian woman detained while protesting against hardline Islamists and awaiting tomorrow's trial.
"Breast Feed Revolution" read graffiti on the women, who wore only denim micro shorts and black shoes, and "Femen Extremist" was daubed on their backs.
The police swiftly arrested them and took them inside the building, before a crowd of journalists.
A group of lawyers linked to the hostile crowd attacked some of the journalists, accusing them of giving a platform to the topless activists.
Also Read
As the young women were being transferred from one office to another within the court building, the lawyers sang the Tunisian national anthem and shouted "Get out!" a rallying cry during the January 2011 revolution that ignited the Arab Spring.
"An inquiry has been opened and they will be placed under arrest and brought to trial," justice ministry spokesman Adel Riahi told AFP, without specifying what the women might be charged with.
The French consul in Tunisia, Martine Gambard-Trebucien, told reporters she had met the women held by police and that they were "fine."
After the scuffles outside the courthouse, police intervened and arrested six French and Tunisian journalists, including from Reuters news agency and France's Canal+ television.
They were later released after giving statements to the police about the controversial protest.
"It is the first action that we have taken in the Arab world... I prepared this international team in Paris and they were sent yesterday to Tunis," Femen's leader in Paris, Inna Shevchenko, told AFP by phone.