Prosecutors had asked the regional court to place Mr. Puigdemont in custody after having examined a Spanish arrest warrant and finding it to have an equivalent in German law — one of several requirements before extradition can take place.
Although the term “rebellion” does not have a direct equivalent in German law, the prosecutors said that it “contains at its core the allegation of carrying out an unconstitutional referendum despite expectations of violent disturbances.”
But the court rejected that view, finding that “the conduct with which he is charged would not be prosecutable in Germany under German law.” The court instead seemed to accept Mr. Puigdemont’s contention that the independence drive was nonviolent.
In an interview with opposition German lawmakers given on April 2 from the prison in Neumünster where he was detained, Mr. Puigdemont denied that he had promoted violence and insisted that all of the money used to pay for the October referendum was generated through donations.
He also said in the interview that he had been overwhelmed by offers of support from Germans, many of whom said they would offer him a place to stay while he remained in the country.
Wolfgang Schomburg, the senior German lawyer on Mr. Puigdemont’s defense team, said that bail would be posted by supporters of Mr. Puigdemont on Friday morning. He will not be allowed to leave Germany under the conditions of the bail and must register each move, the court said.
The government in Berlin has resisted calls from Mr. Puigdemont’s attorneys in Germany to get involved in the affair, insisting that it belongs in the hands of the justice system.
The Spanish government and judiciary did not have an immediate reaction to the German ruling. But several politicians and officials from Catalonia’s pro-independence movement welcomed it as a clear victory.
Josep Costa, a lawmaker from Mr. Puigdemont’s party who recently visited him in prison, said the ruling showed that “there’s justice in Germany,” and he called for “freedom for political prisoners.”
Marcel Mauri, the spokesman for one of the two main Catalonia pro-independence platforms, wrote on Twitter that the decision showed “Europe respects fundamental rights.”
Antoni Castellà, another Catalan politician, called it “an astronomic slap in the face for the Spanish state.”