Trebnje ([ˈtɾeːbnjɛ]) is a town in southeastern Slovenia. Trebnje lies on the Temenica River in the traditional region of Lower Carniola. The area was already settled in Antiquity. The modern settlement developed on the main regional road and railway line from Ljubljana to Novo Mesto. It is the centre of the Municipality of Trebnje.
The area was already settled by humans in the Stone Age. In the Roman times, a settlement named Praetorium Latobicorum was located in the area, along the road linking Emona and Siscia. After the decline of the Roman Empire, the first mention of Trebnje as a market town dates to 1351, and a proto-parish was mentioned in 1163.
The parish church in the town is dedicated to the Assumption of Mary and belongs to the Roman Catholic Diocese of Novo Mesto. It was first mentioned in written documents dating to 1163. The building dates to the mid-15th century. It was vaulted in 1645 and extended in the mid-18th century.
Trebnje Castle is a 13th-century castle on the right bank of the Temenica River south of the town centre. It was extended in the 17th and 18th century. It owes its current look to a 19th-century remodelling in the historicist style.
A railway has connected Trebnje with Novo Mesto and Ljubljana since 1894, and with the town of Sevnica since 1938. Part of the railway towards Sevnica up to the mining settlement of Krmelj was already built by 1908, although since 1996 Krmelj has not been included on it. Since 2010, the A2 motorway, traversing Slovenia from northwest to southeast, has run past Trebnje.