Inspectors say there's been a 'significant improvement' at the trust that runs Basingstoke and Andover hospitals.
The Care Quality Commission's given the Hampshire Hospitals NHS Foundation Trust a 'good' rating, up from 'requires improvement'.
An inspection in January found it had got better in areas including urgent services, medical care and leadership.
It was, however, rated as 'requires improvement' for use of resources.
CQC’s Deputy Chief Inspector of Hospitals, Nigel Acheson, said, “Hampshire Hospitals NHS Foundation Trust has worked steadily to embed the improvements we requested at our last inspection.
"I want to congratulate them for this work. It has helped them move from Requires Improvement to Good overall and gaining an Outstanding rating for caring.
“I am pleased that during this inspection we have been able to record improvements in all areas– notably with medical care and surgery, both moving from Requires Improvement to Good. End of life care remains Outstanding. "
Julie Dawes, chief nurse at Hampshire Hospitals, said: “Being recognised as a ‘Good’ trust by the CQC is a fantastic step forward for us and we are all extremely proud of this achievement. I am delighted that the hard work and dedication of our staff has paid off and been rewarded in this way.
“We are especially pleased to have been rated as ‘Outstanding’ for caring. Our trust vision is to provide outstanding care for every patient. That is at the heart of everything we do, so it’s fantastic that the CQC have recognised our efforts.
“We are seeing the same commitment and dedication every day as we tackle the challenge of COVID-19, with our staff showing incredible compassion in these exceptional circumstances and providing outstanding care for patients with the virus. It is also brilliant to see the improvements we have made in areas such as our emergency departments directly benefitting patients and making a real difference in our fight against COVID-19.”
Basingstoke MP Maria Miller joined the congratulations - she says, “I congratulate the Trust and applaud the dedication of every single members of staff to achieve this fantastic rating.
"Our hospital is stepping up to combat the international COVID-19 pandemic and I am immensely proud of the remarkable job being done in exceptional circumstances.”