For scores of children and parents, being assigned to Sandra Santos-Vizcaino’s third-grade classroom at Public School 9 in Brooklyn felt like winning the lottery.

Though Matteo Flores was only in the first grade this year, he was already hoping she would be his teacher in two years. Then he heard the news. “I guess she won’t get to be my teacher anymore,” he told his mother.

Ms. Santos-Vizcaino died on March 31 of complications of the coronavirus, her son, Victor-Luis, said. She was 54 and is believed to be the first public-school teacher in New York City to die of the virus, according to the Department of Education.

Ms. Santos-Vizcaino spent four years as one of the most beloved instructors at P.S. 9, in the Prospect Heights neighborhood, part of her 25-year teaching career in New York City, which is the country’s largest public school district.

The most dazzling classroom teachers are able to mix warmth and love with seriousness and rigor, and Ms. Santos-Vizcaino mastered that balance in spades.

One parent, Kelly Garcia, said she worried constantly worried about her son’s academic progress as he struggled with an attention deficit disorder. Anxieties about her son hovered over her like a “black cloud,” she said.

Those fears dissipated on a visit to P.S. 9, where Ms. Santos-Vizcaino wrapped Ms. Garcia in a bear hug, told her, “We’ve got this,” and offered ideas on how they could help her son together.

“She was a mentor to me as a mother,” Ms. Garcia said. “I think one of her missions in my son’s life was to never allow anything to break his spirit.”

Ms. Santos-Vizcaino was born on Nov. 1, 1965, in Cotuí, in the Dominican Republic. Her father, Antonio Santos, was an aviation mechanic for the Dominican Air Force, and her mother, Natividad Brito, worked as a seamstress before starting a cake-baking business.

Ms. Santos-Vizcaino moved to New York City when she was 11. She graduated from Bard College and completed master’s degrees in science education and science at Long Island University.

In addition to her son, Ms. Santos-Vizcaino is survived by her husband, Felix, and a daughter, Viviana.

Ms. Santos-Vizcaino often included students in her parent-teacher conferences. She asked children to reflect on their academic progress and goals, which parents said was a rare but particularly effective motivational tool. Her class was part of P.S. 9’s dual-language program, with instruction in both English and Spanish.

She would prepare goody bags filled with candy on Valentine’s Day and before Christmas, and always dressed up for the school’s Halloween parade. She was a skilled baker who often brought in cakes for bake sales and birthdays.

For the school’s yearly silent auction, Ms. Santos-Vizcaino would offer herself for a day out with a student. Furious bidding ensued.

Fatimah Ali, P.S. 9’s principal, said Ms. Santos-Vizcaino was “the rock” for the school’s other dual language and third-grade teachers.

Deirdre Levy said it was her first year teaching at P.S. 9, and that Ms. Santos-Vizcaino’s frequent invitations to lunch in her classroom helped ease her nerves. Ms. Santos-Vizcaino also welcomed her into the school’s equity and diversity team; the 7:30 a.m. meetings became a highlight of Ms. Levy’s year.

“I’ve never had that kind of support from a colleague,” Ms. Levy said.