Mr Cassells, aged 40, of Mouswald Banks Farm, Mouswald, Dumfries, had pled guilty to two contraventions of the Water Environment and Water Services (Scotland) Act 2003 at an earlier hearing.
He had produced silage and stored manure on his farm, and failed to control the overflow of effluent from this, which flowed into his farm yard and entered the surface water drainage system. Due to a blocked drain, that effluent did not reach the Breconrae Burn. Had it done so, it is likely that significant pollution would have occurred.
Craig Harris of the Wildlife and Environmental Crime Unit at the Crown Office, said: "The neglect shown by Raymond Cassells could have had a horrific effect on the local water. It was simply fortune that a blocked drain prevented a far more severe environmental incident.
"The steps to prevent this offence were straightforward but were not taken and advice from SEPA was ignored. A responsible farmer would not act in such a way.
"Those who offend against our environmental laws will continue to be brought to account," he added.