Fire crews were called to an incident at a hospital in the Rhondda in the early hours of Sunday morning.
South Wales Fire and Rescue Service received a report of a fire on a residential ward at the Llwynypia Hospital at 4.11am.
Patients and staff were evacuated from the area and the fire was contained to the ward it originated in.
A spokesperson for the force said: "At 4.11am on March 7, a call was received to a confirmed fire in Llwynypia Hospital, Ysbyty Cwm Rhondda, within a residential ward.
"Due to actions of initial crews and on-site nursing staff, the fire was contained to the room of origin.
"No staff or patients suffered any ill effects.
"Six fire engines and a number of special appliances attended which enabled a quick resolution of the incident.
"Officers remain at the scene working with on-site staff to assist with returning of hospital normality.
"The cause of the fire is still under investigation."
Find out about local issues in your area:
An investigation into the case of the fire is now underway.
Gareth Robinson, chief operating officer at Cwm Tag Morgannwg UHB said: "In the early hours of Sunday morning (March 7, 2021), a fire incident happened at one of community hospitals - Ysbyty Cwm Rhondda.
"The fire affected one ward and no harm came to any patients or staff as a result of the incident.
"All patients affected by the incident were promptly relocated within the hospital for their safety.
"Our staff acted extremely quickly, and combined with the effectiveness of our Health Board’s fire protocols, the fire was confined to one area of the site and swiftly resolved.
"Any members of the public due to visit the hospital today, in accordance with the current Covidrestrictions, should feel completely reassured that the hospital is safe.
"All next of kin of patients affected by this incident have been communicated with.
"We are grateful for the support of our emergency services colleagues in handling this incident."
Chris Bryant, MP for the Rhondda, said: "A huge thank you to the six Welsh Fire Service crews who were called out during the early hours of this morning at Ysbyty Cwm Rhondda.
"A huge thank you to the staff at the hospital, too, for getting the hospital back to normal. It's thought nobody was hurt which is fantastic to hear."