People lived on Mount Malmasín as early as the 3rd or 2nd century BC, but the town you walk around today dates from 1300. That year Diego López V de Haro, Lord of Biscay, granted a charter and set the new settlement on the right bank of the Nervión.
Trade made the place. A second charter in 1310 forced the main route from Orduña to Bermeo to cross the San Antón bridge in Bilbao, which made it a mandatory stop between Castile and the sea. In 1372 the Castilian king made it a free port with special rights on iron. The bridge and the church beside it still sit on the city's coat of arms.
In 1511 a royal order created the Consulate of the Sea, which ran the estuary and its port for centuries. A printing press arrived in 1577, and in 1596 the first book in Basque was printed here. In 1602 Bilbao replaced Bermeo as the capital of Biscay. Wool and iron ore went out; wealth came in.
The 19th century brought sieges. Carlist armies, who backed the late king's brother, tried to take this liberal stronghold in 1835, again in 1836 and a third time in 1874. The city held, and on Christmas Day 1836 it was granted the title Unbeaten. The Basilica de Begoña lost its façade and tower in the 1835 fighting; the present ones date from 1902 to 1907.
Then came iron and steel. The railway arrived, the Bank of Bilbao and the stock exchange were founded, and the Altos Hornos de Vizcaya works opened in 1902. In 1880 Bilbao had 11,000 people; by 1900 it had 80,000. The city also annexed several neighbouring municipalities. It got a new City Hall in 1892 and the Arriaga Theatre in 1890.
The Spanish Civil War hit in 1936 and 1937. Bombers raided the city from August 1936, and in May 1937 Nationalist forces besieged it until 19 June, when the bridges over the estuary were destroyed. The bridges were the first things rebuilt in the 1940s. Under Franco, the iron industry revived and migrants from other Spanish regions arrived for the work. They built slums on the hillsides, and in 1947 the Euskalduna shipyard strike was the first of the dictatorship.
The 1980s were harsh. A devastating industrial crisis hit, and on 26 August 1983, during the city's big August festival, the estuary rose up to five metres in places. Two people died and the damage reached about 360 million euros. A former steel mill site on the hill above the old town became a park, with its chimney left standing.
The turnaround began with the Guggenheim in 1997. The Euskalduna concert hall and Calatrava's Zubizuri followed, then the 165 m Iberdrola Tower in 2011. This is called the Guggenheim effect, though the idea that one building can remake a city is unproven in its pure form. The museum did change how the world saw Bilbao. The city won the Lee Kuan Yew World City Prize in 2010 and UNESCO named it a City of Design in 2014.