A Rhode Island police officer is being hailed a hero after saving a man from drowning in cold water.

Jamestown Police Officer Nathaniel Schaffer was covering another employee’s shift the night he responded to a frantic 911 call a little before 1 a.m. from a woman who said her friend was in the water off a pier.

"I think God definitely put me there for a reason," Schaffer told FOX Providence, but he added that "any other officer would have done the same thing given the circumstances."

When Shaffer arrived at the scene, the 34-year-old man from Brighton, Massachusetts, was initially responsive in the water and according to his friend, he willingly jumped into the water but as time passed he wasn’t responding to the officer.

CALIFORNIA GOOD SAMARITAN RESCUES 3 PEOPLE FROM BURNING TRUCK, COPS SAY

"He became lifeless. He kinda floated, rolled over to his side," Schaffer said. "His mouth was half in the water, half out. He was taking in water with each breath."

While his sergeant was grabbing a flotation device, Schaffer jumped in.

Shaffer grabbed the man and swam to the ladder but the dock was too high to climb six feet, so they decided to go to a lower dock about 100 feet away.

By the time rescue crews had arrived to get the man out of the water, Schaffer said he was unresponsive and foaming at the mouth.

BODYCAM CAPTURES ATLANTA POLICE OFFICER RESCUING MAN FROM BURNING CAR

Both were transported to the Newport Hospital. Schaffer was treated for mild hypothermia and the man recovered after a few days as well.

On Tuesday night, the man he saved paid a visit to the police station to thank Shaffer in person and assured him that he wasn’t going to go swimming in that pier again.