Treviglio (; ) is a town and comune (municipality) in the Province of Bergamo in the region of Lombardy in Italy. It is situated in the heart of the Po Valley, approximately south of the provincial capital, Bergamo. With a population of 31,604, it is the 2nd-largest comune in the province.

Founded during the Early Middle Ages through the unification of three settlements for defensive purposes, Treviglio serves as the main hub of the Gera d'Adda region. Its strategic location is underscored by its position at the crossroads of roads and railways connecting it to Bergamo, Brescia, Cremona, Lodi, and Milan. Portoli, Pisgnano, and Cusarola united to form a fortified center called Trivillium.

A less likely theory suggests the name comes from the Latin Trivium, meaning a crossroads of three roads, known as a trivium. located within the Gera d'Adda, a region largely within the lower Bergamasque area between the Adda and Serio Rivers, approximately 2 km from the former. It borders the municipalities of Arcene, Brignano Gera d'Adda, Calvenzano, Caravaggio, Casirate d'Adda, Cassano d'Adda (MI), Castel Rozzone, Fara Gera d'Adda, and Pontirolo Nuovo.

Although situated in the Po Valley, the terrain features elevation changes of up to 15 metres near the Adda River due to a morphological terrace known as the Treviglio Coast. The city's central core lies at 125 metres above sea level, with the altitude varying by 35 metres, gradually decreasing from the northeast to the southwest. Beneath the alluvial layer, the terrain includes strata from the Quaternary, marine deposits, Pliocene, Langhian, Aquitanian, and Holocene periods.

The western part of the municipal territory is crossed by a morphological terrace called the Treviglio Coast, dividing the municipality into two distinct zones: the eastern area, encompassing the city center, most of Geromina, and all of Battaglie and Castel Cerreto, dates to the Pleistocene, while a smaller western portion, including the Pezzoli farmstead and the Treviza lake, belongs to the Holocene. It is classified as Zone 3 (low seismicity) by the Protezione Civile. Treviglio experiences minimal wind activity at ground level due to the region's geographical configuration. Wind speeds typically remain below 0.5 m/s, decreasing further in winter.

According to the Italian climate classification system, Treviglio is in Zone E with 2,237 DD.

History