The Western Australian Government Railways (WAGR) was the primary state-owned rail operator for Western Australia. The WAGR originated from the Department of Works and Railways created to run the Northern Railway between Geraldton and Northampton when it opened in 1879.
In 1890 the Works and Railways department was replaced with the WAGR, which would continue under that name until 1975 when its trading name changed to Westrail until 2000, with the WAGR being taken over by the Public Transport Authority in 2003 under the name Transwa.
In 1986 inner-city suburban lines were handed over to the newly established Transperth. In addition to rail services, the WAGR also operated trams, and ferries and provided electricity during its tenure, being renamed several times to reflect what it was doing.