Updated

When Miguel de Cervantes wrote "Don Quixote" in the 17th century, he couldn't have imagined that the novel would be used as a weapon in a modern battle over freedom of speech in Spain.

In defiance of a court order banning a book that investigates drug trafficking in Spain, the Madrid Booksellers' Guild has launched an online tool that automatically pulls some 80,000 words from the classic novel to piece together the contents of the banned work.

"We feel that this prohibition of a book, which is something that hasn't happened in Spain for more than 30 years, is an attack on our freedoms," Fernando Valverde of the Booksellers' Guild told The Associated Press.

The booksellers' move is the latest flare-up in a wider legal and political dispute over freedom of expression that has been rumbling in Spain in recent months. Other flashpoints include the cancellation of a photo exhibition on political prisoners, and prison sentences for rappers over lyrics deemed insulting to the Spanish royals.

The banned book controversy centers on "Farina" ("Flour," a slang term for cocaine,) published in 2015 by journalist Nacho Carretero. The book investigates drug smuggling in Galicia, a region in the northwestern corner of Spain, and was made into a Spanish TV series which premiered last month.

Among other things, the book recounts charges and court proceedings in cocaine investigations that involved a former Galician politician, Jose Bea Gondar.

Gondar accuses Carretero and his publisher, Libros del KO, of tarnishing his reputation. He wants references to him taken out of the book and 500,000 euros ($620,000) in damages.

A judge last month ordered a temporary ban on sales, which had reached around 35,000 copies, while the court considers the case.

The Madrid Booksellers' Guild this month launched "Finding Farina in Don Quixote," an online tool which it calls "a way of defending liberty and freedom of expression."

Clicking on a link on the www.findingfarina.com website gradually pulls up the first page of the book as the tool visibly grabs the words it needs from "Don Quixote" on the right hand side of the web page. It does the same for each new page of "Farina." For people's names and for words not used in Cervantes' time, it picks out syllables and sticks them together. It's not an easy read but Valverde, of the Madrid Booksellers' Guild, says that's not the point.

The tool "demonstrates how ridiculous and anachronistic" the judge's decision was in a digital age, he said.

The court has not yet reacted to the website's launch, he said.

It's one of several recent controversies about freedom of expression in Spain. Many were outraged that artistic license was being censored when prison sentences were slapped on Spanish rappers last month over lyrics that were deemed to be praising terror groups, encouraging violence and insulting the Spanish Crown and the police.

Also last month, a government-funded body running the venue for the prestigious Madrid's International Contemporary Art Fair was accused of censorship when it pulled a photo exhibition called "Political Prisoners in Contemporary Spain." It argued that controversy over the exhibit was hogging public attention, but later apologized for the move and insisted it wasn't intended as censorship.

In another case, many people cheered when the European Court of Human Rights rebuffed the Spanish judiciary in a ruling against protections afforded by Spanish courts to the royal family. The European court earlier this month sided with two Spaniards who set fire in public to a photograph of Spain's king and queen, saying their protest amounted to freedom of expression. They were initially sentenced in Spain to 15 months in prison.

Some other similar controversies in Spain have stemmed from a crackdown on perceived terror threats and echo a debate that has been repeated in recent years across Europe.

Article 578 of the Spanish Criminal Code, punishing anyone who "glorifies terrorism," was expanded in 2015 after terror attacks in Paris that killed 130 people. It cast its net so wide that puppeteers purveying political satire, journalists, musicians and everyday users of social media have fallen foul of the law. Some believe the law went too far.

"Spain is emblematic of a disturbing trend which has seen states across Europe unduly restricting expression on the pretext of national security and stripping away rights under the guise of defending them," Eda Seyhan, Amnesty International's campaigner on counter-terrorism, said in a report earlier this month.

"People should not face criminal prosecution simply for saying, tweeting or singing something that might be distasteful or shocking," Amnesty International's report said. "Spain's broad and vaguely-worded law is resulting in the silencing of free speech and the crushing of artistic expression."