NEW YORK (CBSNewYork) – Meet 2-year-old Harper, a dog who had a really “ruff” day in until being saved by a surprise hero in the East River near Brooklyn.

It all started when a dog walker was hit by a car and knocked over, letting go of Harper’s leash, reports CBS2’s Valerie Castro.

READ MORE: First Case Of Omicron Variant Reported In New Jersey

The dog was so scared after the accident she took off running and somehow ended up in the East River.

“She’s never swam before,” said Harper’s owner, Erin O’Donnell.

Nearby, Gabriel Castellanos was enjoying his 38th birthday with some friends. Lucky for Harper, he attended the SUNY Maritime School in the Bronx and has been trained in water rescues.

Castellanos says in the midst of his celebration, someone spotted the dog that appeared to be in trouble.

”My brother jokingly goes, ‘Oh you should probably go in there to save it,’” said Castellanos.

That’s when he found this life jacket on the barge and made his way over to the pedestrian pier.

The dramatic events that unfolded next were all captured on cellphone video by Brooklyn based filmmaker Lorenzo Fonda.

Castellanos found a good spot to jump in, and the drama ensued as a police helicopter hovered above.

READ MORE: NYPD: 1 Dead, Another Injured In Apparent Drug-Related Shooting At Brooklyn Airbnb

The crowd of onlookers were brought to tears and cheered as Castellanos got closer to Harper.

The dog tried swimming away when people began yelling, and when finally Castellanos reached out, the move startled her.

“That completely terrified her, and she came back and snapped me in the face,” he said. “You can see she caught me up here and her lower jaw hit me in the front teeth, knocking this tooth out and chipping my two front teeth.”

Eventually both got back to shore – both completely exhausted.

Castellanos was taken to the hospital to be bandaged up, but he says despite the injuries and being a pet owner himself, he doesn’t regret a thing.

“Even if it’s not my pet, I would do it again, 100 percent,” he said.

As for Harper, she’s back home, still recovering and wearing boots until her paws can heal.

“I’m forever grateful having him be there at the right place at the right time,” said O’Donnell.

MORE NEWS: Alvin Ailey American Dance Theater Back On Stage After Pandemic Shutdown With Message Of Hope

As for the dog walker who was initially hit by a car and setting off this whole chain of events, CBS2 is told he had minor injuries and is also recovering.