Environment Canterbury brought the prosecution against both parties.
The Environment Court imposed fines of $29,000 and costs against each company.
Judge JR Jackson said both companies were responsible for the maintenance of the transfer sump and stone trap and were "equally culpable" for the malfunctioning system.
Judge Jackson added that a lack of clear communication between the dairy farm owners and the milking contractor about the state of the stone trap and sump was also a factor.
"The defendants each say the other was responsible for the maintenance. In the meantime, the system failed. While they were standing back failing to take responsibility this unnecessary discharge occurred. That is an unacceptable deferral of responsibility."
ECan Principal Resource Management Advisor Richard Purdon said the ponding of dairy effluent in this way is unauthorised because it can both flow overland into surface waterbodies and also saturate the soil, increasing the likelihood of effluent leaking into the groundwater.
"Waterways in this area are particularly susceptible as the groundwater is very shallow. There are springs nearby and the water quality has been progressively deteriorating." Mr Purdon says.