A veteran New York City firefighter who died while preparing for a training exercise earlier this month was remembered Thursday as a loving husband and father who was dedicated to his profession and public service.

Hundreds of firefighters joined family and friends for the funeral of William P. Moon II in Bay Shore on Long Island.

Firefighters from numerous departments lined Main Street as Moon's casket was transported on a fire engine in a procession to St. Patrick Roman Catholic Church.

VETERAN CT FIREFIGHTER DEAD FROM INJURIES SUSTAINED AT A BLAZE IN 4-FAMILY HOME

Kristina Moon called her husband her best friend and a devoted father to their two children during the service, adding he always knew how to make them laugh.

"For Billy, it was never about making himself better, but about what can be done to better serve those around him," she said.

Funeral of William Moon II, Bay Shore, New York

The funeral procession for firefighter William Moon II, an FDNY veteran who was killed while preparing for a training exercise. (NYC Mayoral Photography Office)

New York Mayor Eric Adams and fire department leaders also spoke at the funeral, praising Moon for his service and noting how he helped save others' lives after his death through organ donations.

"We’re going to miss firefighter Moon," Adams said. "But he was not only a hero in life, he understood what it meant to be a firefighter: courage, bravery and sacrifice."

SON OF FIREFIGHTER WHO DIED ON 9/11: 'MY DAD WAS LIKE SUPERMAN'

Moon was to be buried in a cemetery in Bay Shore.

He suffered a fatal head injury on Dec. 12, when he fell 20 feet inside his firehouse while preparing for a drill, officials said. He was 47.

CLICK HERE TO GET THE FOX NEWS APP

Moon joined the department in May 2002 and spent nearly 20 years at a ladder company in Queens before transferring last January to Rescue 2, an elite unit that doesn’t just fight fires but also rescues window washers dangling from scaffolding and construction workers trapped in collapsed buildings.