A long-running dispute over allegations of censorship by Facebook has come to a head in a French court, where the social network denied it had deleted a user’s account because he posted a picture of a 19th-century painting of a woman’s genitals.

L’Origine du Monde (The Origin of the World), an 1866 oil painting by the realist painter Gustave Courbet, hangs on the walls of the Musée d’Orsay in Paris.

But Frédéric Durand, a teacher, claims that its status as a cherished work of art did not stop Facebook from shutting down his account because of its ban on nude images.

He accuses Facebook of deactivating his account “without warning or justification” in February 2011.

He promptly sued the company in the name of freedom of expression, but the case came to court only after years of legal wrangling over jurisdiction.

Durand made repeated attempts to have his account restored but Facebook’s lawyers said on Thursday it was technically impossible, since it keeps data from deleted accounts only for 90 days.

In the meantime, Facebook made rule changes in 2015 clarifying that depictions of nudity in artwork were acceptable.

Besides having his account restored, Durand is seeking €20,000 ($25,000) in damages.

Durand had posted a link to an article exploring the history of the painting, which used the famous image as a thumbnail.

His lawyer Stéphane Cottineau had previously acknowledged that Facebook banned nude content at the time, but argued that the painting was “a major work” which is “part of France’s cultural heritage”.

The closeup of the woman’s crotch and abdomen is a depiction of nudity that has been “glorified, made sublime, through the talent of the artist”, Cottineau had said.

The Musée d’Orsay, which has held the painting since 1995, says on its website that the work “escapes pornographic status” thanks to “Courbet’s great virtuosity and the refinement of his amber colour scheme”.

Facebook fought for five years to avoid being taken to court in France over the case.

L’Origine du Monde, by Gustave Courbet. Photograph: Christophel Fine Art/UIG via Getty Images

It argued that the teacher, like all Facebook users, had signed off on terms and conditions that say any legal disputes must be settled in California, where the company is based.

But a Paris appeals court ruled in February 2016 that the case should be heard in France.

On Thursday, Facebook’s lawyers denied any censorship, saying that after Durand’s account was deleted he opened a second one, also using a pseudonym, where he again posted the Courbet painting – and which remains active.

The plaintiff “has not offered any proof of a link between the deactivation of the account and the publication of the work by Gustave Courbet”, Caroline Lyannaz said.

She and Facebook’s other lawyer called the lawsuit unjustified and asked for a symbolic penalty against Durand of one euro – though they did not explain why his account was taken down, referring only to “a simple contractual dispute”.

But Durand’s lawyer dismissed that argument.

“The deactivation of the account two and half years after it was opened, and just after L’Origine du Monde was posted, cannot be a coincidence,” Cottineau said.

The court is to announce its ruling on 15 March.

A Facebook search today returns numerous uncensored posts featuring images of L’Origine du Monde.

The painting, one of several female nudes completed by Courbet, shocked the stiff bourgeois society of his time.

It is believed to have been commissioned by a Turkish diplomat in Paris who was forced to sell it after racking up huge debts because of his gambling addiction.