Spain's highest criminal tribunal, the National Court, found them guilty of an "attack on authority" by smearing the head of government for the Navarre region, Yolanda Barcina, with sticky white pies in 2011.
"These are not dangerous objects, nor are they likely to cause injuries, and that was not the aim, but they did involve bodily violence" when pushed into Mr Barcina's head and face, the court said in a written ruling.
"The victim was struck three times with pies."
Ms Barcina, 53, fell victim to the pies while seated at a public meeting during an official visit to the southwestern French city of Toulouse in October 2011.
"I was totally disoriented… It was a strong hit with a pie because it hurt, it hurt a lot," Ms Barcina said during the trial, in testimony broadcast on public television.
"Another two hits with pies and I got up. I think it was almost by instinct because I was totally disoriented because logically the meringue prevented me from seeing."
Activists opposed to a plan to build a high-speed railway link with France through the Spanish Basque country and Navarre regions claimed responsibility for the pieing.
Gorka Ovejero, Julio Martin, Ibon Garcia et Mikel Alvarez Forcada sit on the opening day of their trial in Madrid. Photo: Fernando Villar/EFE/AFP
A public prosecutor had demanded five years' jail for all four defendants, who reportedly denied having been present in Toulouse during the attack.
Ms Barcina's lawyers demanded nine years in jail for one of them, Gorka Ovejero, an elected official in the Navarre municipality of Arruazu, and six years for the other three: Julio Martin, Ibln Garcia and Mikel Alvarez Forcada.
The court on Wednesday convicted the first three of attacking her and sentenced them to two years. It convicted Alvarez of acting as an accomplice and handed him a one-year sentence.
Under Spanish law, a defendant with no previous convictions does not serve time in jail if the sentence is two years or less.