The class M was a 4-4-0T tank locomotive for suburban service around Melbourne. The prototype No. 40 was built in 1879 by Beyer Peacock and delivered to Australia. 21 more were built by the Phoenix Foundry in Victoria between 1884 and 1886. To increase the supplies, they were rebuilt to the class ME with an additional trailing axle at the Newport workshops between 1901 and 1905. In this process, they also got a new leading bogie, the cylinder diameter was increased from 17 to 18 inches and the boiler pressure was raised. They became surplus with the electrification of the suburban network and were withdrawn between 1913 and 1922.