Matai was the government's lighthouse tender servicing the marine lights around New Zealand and offshore islands, and had been used for cable laying in the 1930s. She was named after the native mataī tree.
She was requisitioned on 3 March 1941 and handed over to a dockyard for conversion.
After commissioning on 1 April 1941, Matai took over as the flotilla leader of the 25th Minesweeping Flotilla from Muritai and the flotilla began clearing a German minefield in the Hauraki Gulf.