PORTSMOUTH, N.H. – A police officer is being credited with helping to save a 2-year-old’s life when the toddler became pinned under a 400-pound rock.

Portsmouth Police Officer T.J. Potter was one of the first on the scene on Friday, when the boy became stuck while playing outside of his Portsmouth home.

READ MORE: Jewish Community Upset By Menorah Display In Medford: 'A Total Slap In The Face'

“He didn’t look good. I was really worried at first,” Potter said.

Portsmouth, N.H. Police Officer T.J. Potter. (WBZ-TV)

Potter, who worked as a stone mason for a decade before joining the police force, saw that one stone was close to giving way, and could crush the 2-year-old’s head.

READ MORE: Lawrence Shooting Leaves 1 Dead

“We didn’t think we had a lot of time to really think too much about it. We needed to act,” Potter said.

He took charge and carefully instructed other first responders in moving the giant rock.

Nine minutes later, the boy was freed and rushed to the hospital with serious head injuries. He is OK and recovering at home, where he is surrounded by family.

Potter’s fellow officers are praising him for a job well done, especially under mounting pressure.

MORE NEWS: Boston College And East Carolina To Meet In Military Bowl

“It makes us very proud as police officers,” said Portsmouth Police Officer Kuffer Kaltenborn.