Thousands said goodbye to slain emergency medic Yadira Arroyo on Saturday in The Bronx, where her five sons fought through unfathomable grief as they remembered their best friend and their hero, whose spirit, they pledged, would forever keep the family together.

“Mommy’s OK guys,” eldest son Jose Montes said from the pulpit of the St. Nicholas of Tolentine R.C. Church in University Heights.

“We’re all OK because we all have each other,” he assured, speaking not to the crowd, but to his brothers.

And they have thousands of new brothers and sisters who also have their backs.

Some 6,000 EMTs and firefighters from the Big Apple, Boston, Baltimore and Canada filled every inch of the five blocks on University Avenue leading to the church, where friends, relatives and colleagues packed the pews.

Ten days before, Arroyo, 44, a 14-year Fire Department veteran, was killed on the job by a mentally ill career con, who stole her ambulance and mowed her down with it.

In an instant of madness, she was taken from her family. But her lessons, which made the boys “tough . . . gentle, wise and curious,” will endure, said Montes, 23.

“She taught me how to listen, because she listened,” he said. “She was the only person who truly understood me. She knew me and my brothers better than we knew ourselves.”

He recalled her playful side, stating she always needed to get the last “goodbye” in when a phone call ended, even if it meant texting him after he hung up.

“I know God’s going to be taking care of her,” he said to the teary crowd. “She didn’t need me anymore, but she left behind people who do. And she can’t take care of me anymore, but she left behind people who can.”

His words touched the congregation, not long after they shared a wrenching moment with Monique Williams, Arroyo’s partner at Station 26 in Morrisania.

Williams and Arroyo were responding to a call of a pregnant woman in distress on March 15, when they were flagged down by a pedestrian about a theft.

When Arroyo got out of the ambulance on White Plains Road near Watson Avenue, 25-year-old Jose Gonzalez allegedly jumped onto the vehicle, and into the driver’s seat, running her down, authorities said.

Williams was scheduled to read a passage of scripture Saturday but was unable to speak when she got to the pulpit. After a few tries, Williams sobbed quietly as Arroyo’s boyfriend, Phil Villafane, an FDNY paramedic, read the words of St. Paul instead.

“Someone who has died, of course, no longer has to answer for sin. But we believe that if we died with Christ, then we shall live with him too,’ he said.

Fire Commissioner Daniel Nigro reassured the sons that they will not be forgotten by the FDNY family, and called Arroyo a “role model” for the department.

“She died a hero, but more importantly she lived as one,” Nigro said. “Your mother leaves behind a wonderful legacy — a legacy of service and of lives saved.”

Added Mayor de Blasio, “The hearts of our city are broken today.”

Arroyo’s mother, Leiea Acevedo-Rosado, couldn’t speak but had a letter she wrote read by an aunt, Ali Acevedo-Hernandez.

“Martin Luther King once said society’s punishments are small, compared to the wounds we inflict on our soul when we look the other way,” the letter stated. “My daughter chose not to look the other way. She chose to step out and help someone in need, she chose to take action, to be compassionate, to give her assistance.

“Her strength, her selflessness, her devotion, her goodness, her infectious smile, they all inspire me,” the mother’s letter continued. “Her purpose in life was to inspire people, to serve others, to bring joy.”

She added: “Look around you. See all those gathered here to honor her. They are here because she was a hero. They are here because she touched lives.”

Arroyo inspired her second son, Edgar Montes, 21, and middle son, Kenneth Robles, 19, to follow in her path and become EMTs.

After the service, Capt. Joseph Jefferson of Station 26 presented a gift to Robles — Arroyo’s helmet, saying it was a symbol of what she was, “someone that was our rock.”

“Having her out there, we were confident that the right thing was going to be done every single time,” he added. Tears streamed down Robles’ face as he held the helmet tight.

Afterward, Robles said he was doing OK, and pointed with pride to his 7-year-old brother, Isaiah Negron.

“He is doing well,” he said. “Look at him.”

Arroyo’s remains will be cremated at St. Raymond’s.

Gonzales, who had 31 prior arrests, is being held in a psychiatric unit on Rikers Island, sources said. He has said he’s innocent, and his lawyer said he is mentally ill and didn’t act intentionally.

As the church cleared out, another of Arroyo’s sons, Justin Robles, 16, looked at the impossible array of blue uniforms, gathered en masse to honor his mother.

“It makes me feel good,” he said.

Additional reporting by Eileen AJ Connelly