A 7-year-old elementary school student is being hailed a hero after he saved his classmate’s life during lunch by using the Heimlich maneuver.

David Diaz Jr., a second-grader from Woodrow Wilson Elementary in Binghamton, New York, stepped into action when he noticed his friend had begun choking on pizza at school.

He said he learned the life-saving move from "The Good Doctor," a TV medical drama he had been watching with his father, David Diaz Sr., during the last year.

NJ TEACHER'S 'HEROIC' RESCUE OF STUDENT CHOKING ON BOTTLE CAP CAUGHT ON VIDEO: 'I JUST WENT INTO ACTION'

"If anybody is choking or is in danger, you always have to save them," David Diaz Jr. told Fox News Digital during a recent phone interview.

"If you don’t, then that could be really sad," the boy added.

David Diaz Sr., David Diaz Jr. and NY State Senator Fred Akshar

From left to right, David Diaz Sr., David Diaz Jr. (front) and N.Y. State Senator Fred Akshar. The trio posed for a photo at Woodrow Wilson Elementary. (Emmanuel Priest/The New York State Senate)

David said he did not know for sure that he would be able to save his friend when he put his arms around him, but he hoped that he could — since he was closer to the choking student than his teachers were at the time. 

Kristin Korba, a second-grade teacher at Woodrow Wilson Elementary, told Fox News Digital that David had been sitting across from the choking student.

"If anybody is choking or is in danger, you always have to save them."

— David Diaz Jr., 7

"The adults were circulating the cafeteria, monitoring," Korba recalled. "David rushed behind [the choking student] and performed the Heimlich."

FLORIDA THIRD GRADER CALLED A 'HERO' FOR PREVENTING POSSIBLE SCHOOL SHOOTING

"I went over right after it happened and checked [on the student who choked]," Korba added. "He was cleared by the nurse and parents [were] contacted."

When Korba spoke with David, she learned he had seen the Heimlich maneuver performed on a TV show and made a note to "remember" it, since it looked like something "important" to know.

David Diaz Jr. and NY State Senator Fred Akshar shake hands.

David Diaz Jr., a Woodrow Wilson Elementary School local hero, and N.Y. State Sen. Fred Akshar shake hands as the 7-year-old is honored during a June award ceremony. (Emmanuel Priest/The New York State Senate)

The Heimlich maneuver, also known as an abdominal thrust, is a first-aid procedure in which a person must apply pressure between someone else's navel and rib cage in order to dislodge an obstruction in the victim's windpipe, according to the National Library of Medicine. 

People can perform the Heimlich on themselves or others in the event of choking. 

"I'm very proud of my son."

— David Diaz Sr.

David’s bravery was recognized on June 13 when Binghamton City School District superintendent Dr. Tonia Thompson and New York State Sen. Fred Akshar paid him a visit.

HEIMLICH HERO: VIDEO CAPTURES STUDENT SAVING FRIEND'S LIFE   

He was presented with a New York State Senate Commendation Award for his heroic deed.

NY State Senator Fred Akshar shake hands present an award to David Diaz Jr.

Proud father David Diaz Sr. (in back, left, behind his son) looks on as David Diaz Jr., 7, is presented with a New York State Senate Commendation Award in June 2022. "He's an angel in my eyes," said the proud dad of his son. (Emmanuel Priest/The New York State Senate)

"I’m very proud of my son," Diaz Sr. told Fox News Digital. "He’s an angel in my eyes." 

"If he’d like to pursue becoming a doctor when he grows up, I'll be happy to help him achieve that later in life. But it’s really up to him," Diaz Sr. continued.

CLICK HERE TO GET THE FOX NEWS APP 

He said he hopes his son will "keep on learning from educational TV shows and become what he wants to become."

Signs of choking and what to know about the Heimlich

Choking is the fourth leading cause of unintentional death in the U.S., according to the National Safety Council (NSC), a Chicago-based nonprofit public service organization.

More than 5,000 people die from choking each year and food is often the culprit the council estimates.

Signs of choking include forceful coughing, gagging, wheezing, throat clutching and passing out, the NSC indicates.

A choking woman clutches her neck while a man starts the Heimlich

The Heimlich maneuver is a first-aid procedure in which a choking person has an obstruction removed from their throat through abdominal thrusts. (iStock)

If a person appears to be conscious and exhibits forceful coughing, onlookers should encourage the potential choking person to cough more to clear their airway before attempting the Heimlich maneuver, the council suggests. 

Rescuers should ask if a person is choking first — and if so, to let them know they’ll receive assistance. The Heimlich maneuver is done when a pair of arms go around a choking person’s body and are placed over the abdomen, according to the NSC. 

The abdominal thrusts should be directed inward and upward in a sharp motion, until the choking person expels the obstruction from the throat.

One of the rescuer’s hands should be clenched into a fist with the thumb-side facing the choking victim’s abdomen "just above the navel." 

The other hand should be clasped over firmly before abdominal thrusts can be performed. 

The abdominal thrusts should be directed inward and upward in a sharp motion, until the choking person expels the obstruction from the throat.

Procedures are slightly different for pregnant women and for people who can’t have arms wrapped around their abdomen. 

Chest thrusts are typically advised in these instances.

For infants and young children, the NSC says rescuers should offer support to choking victims by facing them downward, with one hand holding their head. 

The victim’s torso should be on the rescuer’s forearm against their thigh. Rescuers should proceed by slapping the victim’s back until the food is expelled from the throat. 

Alternatively, chest thrusts can be applied when a young choking victim is lying down on their back. 

In this case, rescuers should place two fingers on the breastbone and apply a sharp thrusting pressure until the person stops choking.

CLICK HERE TO SIGN UP FOR OUR LIFESTYLE NEWSLETTER

In cases in which a choking victim becomes unresponsive, cardiopulmonary resuscitation (CPR) and potentially automated external defibrillation (AED) will need to be performed until medical professionals arrive, the NSC says.

Families can learn how to perform the Heimlich maneuver, CPR and AED from a local hospital, Red Cross or National CPR Foundation. 

FOLLOW US ON FACEBOOK FOR MORE FOX LIFESTYLE NEWS

Instructional videos are also available online to help people familiarize themselves with these life-saving techniques. 

In-person classes with certified trainers could be beneficial, however. Depending on the course provider, classes can be free or come with a cost.