The earliest trace of humans in Büren are scattered neolithic and La Tene items. The Roman era road between Aventicum and Salodurum (Solothurn) runs through the area that would become the municipality. Roman ruins include part of the road and a milestone at Bürenmoos, a canal at Burgweg and what may have been a country estate on Kirchmatt. Above the town, on the Schlosshubel hill, was the high medieval Strassberg Castle, the home of the Baron of Strassberg. The town was built on a narrow strip of land between the Städtiberg and the Aare. The town received a town charter from Berchtold I of Strassberg in 1260, which was confirmed in 1288. Under the Barons, the town became the center of the Büren "Herrschaft". During the 13th and 14th centuries, the Counts of Neuchâtel gained power in the Herrschaft. In 1345, financial difficulties forced Imer of Strassberg to pledge some rights in the town to Solothurn. In 1369 Solothurn also acquired the right to collect duties and tolls in Büren. In 1375 Enguerrand de Coucy besieged the town, but did not take it. After Imer's death the town was inherited by the Counts of Neu-Kyburg, who then sold it to Austria. During the Sempach War, Büren was besieged and captured by Bern and in 1388 it was placed under joint Bern-Solothurn control. In 1393, the captured land was finally divided and Büren became the capital of a new Bernese bailiwick. In 1620-25 Büren Castle was built on the main street as the official residence of the Bernese bailiff.