Prisoners at HMP Kilmarnock were taken to hospital after an incident believed to involve drugs over the weekend.
Three prisoners were taken to Crosshouse Hospital following suspected drug misuse at the facility.
All three have since been discharged and returned to jail.
An investigation is now underway to determine the cause of the incident.
HMP Kilmarnock is operated by Serco Ltd on behalf of the Scottish Prison Service under a contract with the Scottish Ministers.
A Serco spokesperson said: "I can confirm that the three prisoners were all discharged from hospital over the weekend and returned to HMP Kilmarnock."
Joanne Edwards, director of acute services at NHS Ayrshire & Arran added: "We are aware of a small number of prisoners who have been admitted to University Hospital Crosshouse following suspected drug misuse.
"We are working with the prison healthcare and prison custody staff to investigate the circumstances around this incident."
"Due to patient confidentiality, it would be inappropriate to comment further."
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules here