Senior Sergeant Lyn Fleming chose to work her final New Year's shift to help support her colleagues, the police commissioner says.
Fleming, an officer for 38 years, died after being hit by a car in the early hours of New Year's Day in Nelson.
She was farewelled by hundreds at Nelson's Trafalgar Centre on Thursday.
During the service, police commissioner Richard Chambers spoke about Fleming's loyalty to her career and the care she had for the staff she was in charge of.
As a senior officer, Fleming did not have to work the New Year's Eve to New Year's Day shift, Chambers said, but she wanted to anyway, to support her staff.
Her shift began the same way she had many times over the last 38 years and seven months, Chambers said.
"At the start of shift, Lyn produced a range of snacks for her colleagues to help keep them going through the night shift.
"She cared deeply about her staff."
While getting ready she made a comment about how sore her feet would be at the end of the shift, Chambers said.
What happened during that shift was a "senseless" and "unprovoked" act of violence, Chambers said.
Chambers told Fleming's children, Aren and Rayna Olsen, their mum had been a "superstar".
"Your mum has paid the ultimate sacrifice, and for that I am sorry".
Fleming was the first policewoman to be killed in the line of duty in New Zealand - she was described by loved ones as "humble" and a matriarch of the Nelson Police Station.
Fleming's casket was carried out of the funeral service by her Nelson team - Sergeant Adrian Cupit, Sergeant Nigel Orpwood, Sergeant Craig Clayworth, Sergeant Tony Esera, Sergeant Alana Kane, Sergeant Tim Wincer and Senior Sergeant Byron Reid.
A number of officers performed a haka, Ko Te Uru Pounamu, in her honour outside.
Sign up for Ngā Pitopito Kōrero, a daily newsletter curated by our editors and delivered straight to your inbox every weekday.