BUDAPEST, Hungary (AP) — Only her quick reaction prevented a tragedy as Andrea Fuentes made a dramatic rescue.

The United States coach knew something was wrong when she saw artistic swimmer Anita Alvarez sink motionless to the bottom of the pool during a solo free routine at the world aquatics championships on Wednesday.

The fully clothed Fuentes dived in. She swam to the unresponsive Alvarez, put her arms around her, and lifted her to the water’s surface, where another person helped get her out of the pool.

Alvarez, a two-time Olympian, had fainted.

She was immediately given medical attention. She was feeling much better on Thursday.

“Anita has been evaluated by medical staff and will continue to be monitored. She is feeling much better and using today to rest,” USA Artistic Swimming told The Associated Press in a statement.

“Watching yesterday’s medical emergency of 2x Olympian Anita Alvarez and subsequent rescue by coach Andrea Fuentes was heartbreaking for our community. She gave an exceptional solo performance and competed brilliantly in four preliminary and three final competitions across six days.”

Alvarez finished seventh in Wednesday’s individual final.

“Whether or not she will swim in the free team final on Friday ... will be determined by Anita and expert medical staff,” USA Artistic Swimming said.

Fuentes also said Alvarez was doing much better in an Instagram post.

“The doctors checked all vitals and everything is normal: heart rate, oxygen, sugar levels, blood pressure, etc… all is okay,” Fuentes wrote. “We sometimes forget that this happens in other high-endurance sports. Marathon, cycling, cross country… we all have seen images where some athletes don’t make it to the finish line and others help them to get there. Our sport is no different than others, just in a pool, we push through limits and sometimes we find them.”