At least 23 people were injured in a stampede on the final day of the running of the bulls at the annual San Fermin festival in the Spanish city of Pamplona.

Runners that tripped and fell in front of the entrance to the bullring created a pile up of people that were crushed as the fighting bulls charged into the ring on Saturday, the AP reports.

Two of the people injured were gored, while others were hurt in the stampede.

The bulls were ultimately let out of a side door to help ease some of the blockage.

"Pile ups there are one of the biggest risks that can occur in the running of the bulls," Interior Ministry regional spokesman Javier Morras told the AP.

On Friday, three people were gored including an American student who had to have his spleen removed.

The running of the bulls, which lasts for eight days, begins every morning at 8 a.m. Thousands of people run alongside six fighting bulls for more than half a mile to a ring where matadors will fight the bulls in the afternoon.