Peñafiel is a town in the Valladolid Province and the greater autonomous community of Castile and León, Spain. It is best known for the Peñafiel Castle and for its medieval square used for bullfights and named "Plaza del Coso". The square is surrounded by private homes, but since medieval times the rights to use their windows, balconies and doorways during bullfights are owned by the town, which auctions them to the highest bidders. The town is full of deep excavated caveswhich were traditionally used to store the wine because of the constant temperature they kept all year around. These caves have chimney vents for ventilation and to evacuate the gases generated by the fermentation of the wine. These chimney vents dot the landscape in and around the town and the castle. In 2006 Peñafiel had a population of about 5,434. Peñafiel was a very important centre in the Middle Ages, as evidenced by the fact that it had up to 19 churches. The town witnessed a clear expansion when the Spanish Rail System reached it, and this also profited the surrounding region. Rail facilitated distribution of goods, of which wheat was the most important. Three factories were established dedicated to the production of flour. This expansion did not, however, serve to develop animal husbandry in the region. The name of Peñafiel derives from the Latin Pinna Fidelis. The name is not casual: the "Peña" served as protection through the years, as the Castle at its top attests. The castle can be seen from kilometers away, and it is a typical postcard of the town. The castle now hosts the Wine Museum of Valladolid, and offers an impressive view of the town and the surrounding region. Below the castle, but above the town, many of wine caves were built. The mountain contains tens of such caves, some of which are as large as. Many wineries are located near Peñafiel: the town is at the heart of the Wine Region of Ribera del Duero. Guided winery visits in La Ribera del Duero are a growing tourist activity.