A court in Spain's Basque region on Monday dropped charges against regional Prime Minister Juan Jose Ibarretxe, who had gone on an unprecedented trial for meeting with the illegal separatist party Batasuna in 2006.
Batasuna is regarded as the political wing of the militant Basque separatist group ETA.
The Superior Tribunal of Justice of the Basque Country also shelved charges against two Basque Socialist politicians and five Batasuna members in the trial that had begun on Thursday.
Two associations lending support to victims of terrorism had argued that the meetings were illegal, because Batasuna had been outlawed in 2003 for links with ETA.
Defence lawyers argued that Ibarretxe and the Socialists had only done their duty by meeting with Batasuna during ETA's ceasefire in an attempt to facilitate eventual peace talks between the Spanish government and the group.
Prosecutors also agreed to charges being dropped, leading the court to decide that there was not a sufficient basis for a trial.
A lawyer representing one of the plaintiff associations, however, said it would appeal against the decision at the Supreme Court.
Ibarretxe, 51, the first Basque prime minister to go on trial, faced a prison sentence of up to nearly three years if found guilty.
The accused also included Basque Socialist leader Patxi Lopez, Batasuna leader Arnaldo Otegi, and four Batasuna members who have been jailed on separate charges.
Ibarretxe and the Socialists held meetings with Batasuna during ETA's latest 14-month ceasefire in an attempt to end the group's four-decade violent campaign which has claimed more than 800 lives.
An incipient peace process between ETA and Prime Minister Jose Luis Rodriguez Zapatero's Socialist government collapsed in late 2006 when ETA violated the ceasefire with a car bombing that killed two people at Madrid airport.
Several Spanish political leaders have held talks with ETA, defence lawyers stressed, summoning witnesses including Zapatero and his conservative predecessor Jose Maria Aznar.
The trial opened two months before the Basque regional elections, which Ibarretxe's Basque Nationalist Party (PNV) could lose for the first time in two decades, with some polls predicting a victory for Lopez' Socialists.