RIDGEWOOD, N.J. — A 10-year-old boy who had been named the town's honorary police chief was given a funeral with full police honors Tuesday, his flag-draped coffin arriving at church to the sound of bagpipes and leaving with a motorcycle escort.

"I lost a partner today," said Police Chief John Ward, fighting back tears as he emerged from the service.

Michael Feeney, who died last week, had struggled for four years with Ewing's sarcoma, a rare, aggressive and often fatal bone cancer that usually develops in children and young adults. In June, he was named honorary police chief for Ridgewood — initially for a day, and then for the rest of 2013.

Officers from more than a dozen police agencies attended the funeral in their dress blue uniforms.

"Michael brought out the best in everybody," the chief said. "I can't believe the response from the departments. I've gotten calls from all over the country, apologizing for not being able to make it. I guess I want to thank the Feeney family for sharing Michael with us. He's touched everybody in this community."

Feeney was buried with his police chief badge, Ward said.

The town 25 miles north of New York City had rallied around the boy, who was running for office at his school and was a huge New York Giants fan. He was to have lighted the town Christmas tree this week. Instead, neighbors decorated the family's home with lights and ornaments while they were away.

"He showed people what it is to care about something without any personal motivation for yourself," Ward said. "He showed courage. He wanted to make a difference."

Ward said it was Feeney who had suggested the department establish a youth academy, and the program will be named the Chief Michael Feeney Junior Police Academy in his honor.

"I think we need to learn from young people like this," he said.