Willy Toledo, a cinema and television actor, is facing a complaint over a social media post last year.
He was arrested in Madrid on Wednesday after he had twice failed to show up for questioning.
The case stems from a July 2017 Facebook message in which Toledo, 48, defended three women charged with blasphemy for staging a mock-religious procession wielding a giant vagina.
In profane language, Toledo expressed contempt in his post for God and the Virgin Mary.
He was denounced by the Spanish Association of Christian Lawyers for "covering God and the Virgin Mary with ridicule".
Oscar-winning Spanish actor Javier Bardem has spoken out in support of Toledo. He said the country risked a return to the repressive era of dictator Francisco Franco.
Javier Bardem defends his friend Will Toledo at a press conference in a Madrid church in May. Photo: AFP
The judge hearing the case must now decide if he sends Toledo to trial.
Those found guilty of blasphemy can only be fined as the offence does not carry a prison sentence.
Toledo, who frequently defends Cuba and Venezuela's communist regimes, told reporters he had asked the judge to shelve the case during the hearing.
"It is worthy of a third world country that there are still five articles of the criminal code relating to insulting religious sentiments," he told reporters as he left the court.
The affair is one of a string of cases of artists being probed or jailed in Spain which have raised concerns about freedom of expression.
The cases date back to the time of Spain's former conservative government, before the new Socialist leadership took office this year.
Several Twitter users and rappers have been tried for glorifying terrorism or insulting the king for comments or lyrics.
Amnesty International said the legal actions amount to "repression" of freedom of expression.
Tapper Valtonyc this year fled to Belgium to avoid a three-and-a-half-year jail sentence for glorifying terrorism, insulting the king and issuing threats in his lyrics.
A Belgian court is due to decide on September 17 whether or not to extradite the 24-year-old.