Seven associations of judges and prosecutors said in a joint statement they had called the strike to show their “deep discomfort” with the “neglect and abandonment” of the justice system.
Around half of Spain's prosecutors and judges took part in the strike, their first joint action, according to organisers.
Judges carried out smaller solo strikes in 2013 and 2009.
“In Spain people have the impression that the judiciary is not as independent as it should be,” Ignacio Gonzalez Vega, the spokesman for Judges for Democracy, told reporters.
In recent years the judiciary has been at the heart of Spanish political debates, especially regarding Catalonia's separatist push.
Prime Minister Mariano Rajoy's conservative government has gone to court to challenge laws passed by separatist leaders in the northeastern region that it deems unconstitutional.
The courts have also blocked attempts by Catalonia's ousted president, Carles Puigdemont, to be re-elected president of the region.
Puigdemont is in Germany facing extradition to Spain for “rebellion” over his role in Catalonia's separatist push.
He is one of nine separatist leaders charged with “rebellion” over their role in Catalonia's separatist push and who were placed in pre-trial detention by Spain's Supreme Court
Catalan separatists have accused the judiciary of doing the bidding of Spanish authorities.
The main association behind Tuesday's strike — which did not specifically mention Catalonia — called for more investment and staff for the justice system.
Prosecutors have “huge workloads”, said the spokeswoman for the Association of Prosecutors, Montserrat Garcia, adding Spain unfortunately lacked “a justice of quality”.
Justice Minister Rafael Catala said he did not “disagree in principle” with the protesters' demands. He stressed that some measures were already adopted in the government's draft budget for 2018.
If the spending plan is approved, Catala has promised to hire 300 judges and prosecutors, and dedicate 130 million euros ($152 million) to improve the judiciary's computer systems.
Tensions between Catala and magistrates increased in April after he questioned the competence of a judge who had ruled against convicting five young men accused of gang raping an 18-year-old woman in a high-profile case in Pamplona.
Judges' associations demanded his resignation, calling his comments made during a radio interview “interference”.