In 1254, Alfonso X of Castile granted the May fair, consolidating commerce, and in 1332 Alfonso XI of Castile granted the March fair. The possession of a bridge over the Ebro since at least the 10th century, together with the concession of the "fuero", have made Miranda de Ebro a great commercial center in the region since ancient times. During the 14th and 15th centuries, and after the disputes between Peter of Castile and Henry of Trastámara, the town of Miranda would pass from hand to hand, first to the domain of Burgos, then to the Álava Hermandad and ultimately once again to Burgos in 1493, where it has remained to the present day.