Runners get trapped with Fuente Ymbro fighting bulls and steer in a stampede at the entrance to the bull ring during the seventh running of the bulls of the San Fermin festival in Pamplona July 13, 2013.

Runners get trapped with Fuente Ymbro fighting bulls and steer in a stampede at the entrance to the bull ring during the seventh running of the bulls of the San Fermin festival in Pamplona July 13, 2013.

PAMPLONA — Dozens of people were trampled at Spain’s San Fermin bull run on Saturday when they were trapped at the narrow entrance to the bullring with the bulls that had been chasing them.

The bull run at San Fermin — made famous by Ernest Hemingway in his novel “The Sun Also Rises” — is one of hundreds in Spain every year and attracts large numbers of foreign visitors.

Local authorities said a 19-year-old Spaniard was being treated in hospital and was in a “very serious” condition. A 28-year-old man from Ireland had suffered chest trauma although his injuries were not thought to be as serious, they said.

At least 23 people were being treated in hospital, medical officials said. A 35-year-old man American was gored in the buttocks by a bull during the run, while an 18-year-old from Spain was gored in the armpit in the scrum at the bullring gate.

The sheer number of runners trying to enter the ring had forced shut a door that was usually left open. Runners and bulls were trapped together in the bottleneck for almost two minutes.

Three men were gored during Friday’s run, including an American tourist who had to have his spleen removed.

The Pamplona run takes place at 8 a.m. every morning for one week in July. Saturday’s run lasted 4 minutes and 15 seconds. Sunday is the last day.

Goring happens from time to time but stampedes are rare and only 14 have died in the last 100 years in the San Fermin run — a festival that that dates from the 13th century.

Runners dress all in white with red neckerchiefs and many spectators stay up drinking all night in bars beforehand.