A 16-year-old Spaniard has been jailed for six years for his part in the 11 March train bombings in Madrid.
More than 1,800 people were injured in the Madrid attacks
He admitted trafficking a significant amount of explosives used in the attack in which 191 people died.
The teenager, accompanied by his mother in court, was the first of around 18 suspects being held by the Spanish to go on trial in relation to the attacks.
Relatives of some of the victims wept in court as the sentence was read out, saying: "It is just not enough."
The BBC's Katya Adler in Madrid says it was a very quick trial.
The teenager pleaded guilty soon after the charges of collaborating with an armed group and stealing explosives were read out.
His hearing was held in public, but the teenager had to sit behind a screen to protect his identity.
Judge Jose Maria Vazquez Honrubia asked him if he agreed with the charges and the six-year term proposed by the prosecutor.
He replied: "Yes."
The teenager will serve his sentence in a juvenile detention centre, after which he will be subject to five years of police surveillance.
Known as El Gitanillo - the little gypsy - in the Spanish press, the teenager's name cannot be revealed since legally he is a minor.
The teenager, who was accompanied by his mother in court, had already admitted to investigators he was paid $1,200 for his work that day.
He was accused of having travelled to Madrid by bus from the north of Spain carrying 20kg (44lb) of stolen explosives.
Once in the Spanish capital, according to the state prosecution, he arranged to meet a group of men in a bar to hand over the dynamite.
At least one of those men, say Spanish police, was a key figure in the bomb-making process.
This was the first trial linked to the multiple train bombings, the worst atrocity in modern Spanish history, so the public and media interest has been huge.
Eighteen other suspects, most of them Moroccan, have also been charged with involvement in the case.
Spain's security services say the attacks were planned by Islamic militants - although they were helped, they say, by a number of petty criminals.