In the year 911, Sopuerta, along with Carranza, was one of the towns mentioned in the Chronicle of Alfonso III (a document that records the history of the reigns of the last Visigoth monarchs and the first Asturian monarchs), described as being outside of the new territory of Biscaj (Biscay).
Sopuerta, like the other valleys in the comarca of Enkarterri, was controlled by independent aristocratic families until the 13th century, when the family of the Lords of Biscay completed their process of taking control of these territories. But the powers of the Lord of Biscay (first vested in the Haro family and then in the king of Castile) did not include making decisions or assuming responsibilities in the Juntas of Guernica (a forum of representatives from Biscay), and the government of Enkarterri maintained its traditional meeting places, which tended to be large trees, churches, or even highly-trafficked fountains.
In the case of Sopuerta, its meeting place was El Carral fountain. Also, every now and then, a fire would come down from the peak of Coliza Hill (which is the one that occupies the central part of the territory) and an alarm would be sounded repeatedly to alert the representatives of the ten “republics” of Enkarterri that there would be a meeting under the big oak tree in Avellaneda. It was also there that the representatives of each government elected a Trustee of Enkarterri who acted in the name of the entire comarca in the Junta of Guernica. However, this did not prevent the rest of Biscay from trying to absorb Enkarterri.
In 1394, the laws of Enkarterri were compiled in the fuero (legal code) of Enkarterri. In 1404, the corregimiento of Biscay was established and its administrator, who by law was required to have been born “on the other side of the Ebro River,” became the judge of the territory and resided right in Avellaneda. In 1592, a mansion was built as the official’s residence. New additions were built onto it in the 16th and 17th centuries to house the junta, which until then had met under the big oak tree. From then on, the Casa de Juntas became the main building in the comarca and within its walls it housed a courtroom, a jail, and a tower.
In 1804, the Juntas disappeared from the history of Avellaneda, and its members joined the Juntas of Guernica. Then, the abolition of the Basque fueros meant the end of the comarca-wide juntas and the end of the administrative function of the Casa de Juntas, which experienced a significant decline until well into the 20th century. As a result of an assembly held days before in Portugalete on August 9, 1931, the villages of Enkarterri met in Sopuerta and wrote up the basis of a demand for a statute of autonomy from the Second Republic.