Attempts to seek and dig up the remains of thousands of victims of Francoist death squads in the Spanish civil war have run into trouble after a court refused to take charge of the search for the bones of poet and playwright Federico García Lorca and others killed alongside him.

A court in Granada, southern Spain, has ruled it is not competent to search for the remains of García Lorca and three other men whose bodies were thrown into an unidentified grave somewhere in the hills overlooking the city.

A local judge ruled that a 1977 amnesty law would prevent those responsible for murdering the author of Blood Wedding from being tried, while a statute of limitations meant too much time had gone by for the crime to be formally investigated.

The decision was a further blow to Spain's historical memory campaigners, who have been seeking help from the courts as they continue a decade-long campaign to dig up Francoist victims and return remains to their families.

Along with similar recent decisions by other courts, it also helped close the door to the naming or prosecution of those who committed crimes against humanity during the Spanish civil war and in the repression that followed during the dictatorship of General Francisco Franco.

The court decisions stem directly from a ruling in which crusading magistrate Baltasar Garzón was reprimanded by the country's supreme court for investigating crimes committed by Franco's fascist-backed rebels.

In that case the court, which had already disbarred Garzón for overstepping his powers while investigating corruption in prime minister Mariano Rajoy's People's party, ruled that he had been wrong to open an investigation into the deaths of 114,000 Francoist victims.

The supreme court also rejected Garzón's argument that, where people had simply been "disappeared", a crime of continuous kidnapping was still being carried out which was not covered by either the amnesty law or a statute of limitations.

Campaigners said they would appeal against the Granada court's decision, taking their fight to the European court of human rights in Strasbourg if necessary.

García Lorca's own family have opposed moves to dig up the grave where he is thought to lie alongside schoolteacher Dióscoro Galindo and anarchist bullfighters Francisco Galadí and Joaquín Arcollas. But the other families are determined to find their relatives.

"We want to help those families whose relatives were thrown into roadside graves," said Rafael Gil Bracera of Granada's historical memory association.

The alleged grave site, at the foot of an olive tree, was revealed to historians by a Spanish communist who claimed to have been forced to dig the grave as a 16-year-old.

The regional government of Andalucia spent €70,000 (£56,000) excavating the site in the hill town of Alfacar in 2009 – but no bones were found.

A local historian, Miguel Caballero, says he will ask the courts to investigate reports that human bones and a crutch that may have belonged to Galindo had been found and reburied when the area was turned into a park bearing the poet's name in 1986.

He wants the courts to quiz officials who allegedly knew that the bones had been reburied at a spot beside the park's gates.