A court has ruled that Facebook can be sued in France over its decision to remove the account of a French user who posted a photo of a famous 19th-century nude painting.

The ruling by the Paris appeal court could set a legal precedent in the country, where Facebook has more than 30 million regular users.

A court will now be entitled to hear the case of the 57-year-old Parisian teacher and art lover whose Facebook account was suspended five years ago without notice. It was closed on the day he posted a photo of Gustave Courbet’s 1866 painting The Origin of the World, which depicts female genitalia.

The Origin of the World by Gustave Courbet. Photograph: Sebastien Bozon/AFP/Getty Images

The man wants his account reactivated and is asking for €20,000 (£16,000) in damages.

Facebook, which has not given an explanation for the suspension, could not immediately be reached for comment after the ruling. Its lawyers had argued that such lawsuits could only be heard by a specific court in California, where it has its headquarters, and that French consumer rights law cannot apply to its users in France because its worldwide service is free.

The appeal court dismissed those arguments and upheld a lower court’s ruling that French courts can hear cases involving users in France.

The appeal court said the small clause included in Facebook’s terms and conditions requiring any worldwide lawsuits to be heard by the Santa Clara court was unfair and excessive. In addition, the judges said the terms and conditions contract signed by any user before creating a Facebook account does fall under consumer rights law in France.

The lawyer representing the teacher said: “This is a great satisfaction and a great victory after five years of legal action.” Stephane Cottineau told the Associated Press the ruling sent a message to all “web giants that they will have now to answer for their possible faults in French courts”.

“On one hand, Facebook shows a total permissiveness regarding violence and ideas conveyed on the social network. And on the other hand, [it] shows an extreme prudishness regarding the body and nudity,” he said.

The French government has lobbied large tech firms to remove violent extremist material from their websites, notably after the deadly attacks in Paris last year.