A seriously mentally ill prisoner had to wait nearly six years before being admitted to the Central Mental Hospital.
Another two prisoners had to wait almost three and a half years, according to new Freedom of Information details.
23 men and three women were transferred from Irish prisons to the Central Mental Hospital in 2019.
These new details show the length of time they had to wait in prison, after being clinically assessed as needing psychiatric care in the forensic mental health facility.
The average length was nine and a half months.
One man had to wait nearly six years, two men waited three and a half years, and one man waited one year and nine months.
"This is extremely worrying because it can be difficult or impossible to deliver mental health care in prison," said Brendan Kelly, a professor of psychiatry in Trinity College Dublin.
"So people who are waiting years or even months are likely not receiving all the treatment that they need.
"And the waiting periods result from simple lack of forensic psychiatry beds in Ireland.
"We have the second fewest number of forensic psychiatry beds in Europe and we need more now."
The HSE says the Central Mental Hospital has 102 inpatient beds and operates at 100% bed capacity.
They added because of the level of demand, admissions are based on the level of urgency of cases.