A Spanish judge has revoked the parental visitation rights of a man who took his 10-year-old son running with the bulls in Pamplona.

Spanish television last week captured images of the boy smiling as he ran ahead of a pack of charging bulls with his father, Luis Miguel Gomez.

The images angered Pamplona city officials — and the man's ex-wife.

According to city regulations, runners in the San Fermin festival must be 18 years old.

The national television channel interviewed the child, and photographs of him and his father were published in several newspapers. When Gomez's ex-wife saw them, she took her case to the police.

On Monday, a judge in the town of Fuenlabrada, southeast of Madrid, revoked the father's visitation rights. Judge Adolfo Carretero told The Associated Press that Gomez put "the little boy's life in danger."

Last week, Pamplona city officials fined the father $200. Gomez told city officials he wanted to run with his son in other Spanish bull runs.

The San Fermin festival, renowned for its all-night street parties, dates to 1591. It gained fame in Ernest Hemingway's 1926 novel "The Sun Also Rises."

Lawrence and Michael Lenahan, brothers from Westlake, Ohio, were gored simultaneously last week in an accident-filled run that also injured 11 others. Since records began in 1924, 13 people have been killed in the runs. The last fatality, a 22-year-old American, was gored to death in 1995.