Livestock faeces has entered a burn that runs near the farm at Knocknagael and down through housing developments in Inverness.
The Scottish Environment Protection Agency (Sepa) has been working with farm staff to resolve the problem.
The housing developments close to the burn include Culduthel Mains and Holm Dell.
A notice has appeared on a footbridge over the burn warning people to avoid the stream's water.
The sign advises people to wash hands and any clothing that does come into contact with the water with soap and warm water.
A spokesman for Sepa said: "Sepa received notification on Friday 5 August of a pollution issue in a burn which runs through Inverness.
"Sepa's investigations since then have identified that the problem originates from Knocknagael Stud Farm.
"We are in contact with all relevant partner organisations. We are working with the Scottish government to prevent any further escape of run-off."
A Scottish government spokesman said: "Action has been taken to address and prevent any further issue with the waste management system at the Knocknagael Bull Stud Farm.
"The Scottish Environment Protection Agency (Sepa) is content with our approach."
The bull stud rents out its animals to crofters and farmers.
Knocknagael and adjoining Balrobert form the Scottish government's bull stud.
A Scottish government-owned bull stud farm is at the centre of a pollution incident.