Overall, the Great Western Hospital was rated as requiring improvement.

Last year’s investment was the biggest ever made at the hospital, which has said it has submitted a plan to address concerns.

CQC’s Neil Cox, said inspectors found a “a mixed picture” in A&E since its last inspection.

They found its responsiveness had gone from requires improvement to good, while safety still needed improvement.

Caring declined from good to requires improvement, while the department was rated good for effectiveness and leadership.

Some patients, Mr Cox said, faced long waits for beds because of pressure elsewhere in the hospital, adding that staff “didn’t always protect people’s privacy and dignity”.

“Due to limited bed availability, people were cared for in corridors for extended periods,” Mr Cox said.