More than 4,500 people gathered Tuesday for the memorial service of a Polk County sheriff's deputy gunned down last week after a routine traffic stop.

Thousands of officers from as far away as Mississippi and Rhode Island stood at attention in neat rows as the casket bearing Deputy Vernon Matthew "Matt" Williams, 39, and the cremated remains of his German shepherd police dog Diogi were carried from Victory Church in Lakeland.

At a somber graveside service at Auburndale Memorial Cemetery, many wept as a dispatcher broadcast the police code that meant Williams and Diogi — unit 3655 Kilo — were out of service.

Click here to visit FOXNews.com's Crime Center

"They are now 10-87 at 18:56 hours," the dispatcher said, her voice breaking. "They will always be forever remembered."

At an earlier memorial service, friends and colleagues remembered Williams as a doting father and dog-lover who never hesitated when faced with danger.

"Please don't mistake our tears of grief today for weakness," Polk County Sheriff Grady Judd said. "The tears you see here are of frustration. Frustration that we could not be there for Matt or Diogi or Deputy Doug Speirs last Thursday morning."

Williams, 39, and his dog were shot and killed Thursday while pursuing a suspect who fled from a traffic stop. Speirs, also 39, was shot in the leg moments later during an exchange of gunfire with the suspect.

Williams was shot eight times, including one shot fired at close range to his temple and another behind his ear, authorities said. Diogi was shot once.

The gunman also traded shots with Lakeland police officers.

The shootings triggered a massive manhunt with more than 500 officers converging on the area from around the state. The all-night manhunt ended almost 24 hours later when a SWAT team fatally shot the suspect, later identified as 27-year-old Angilo Freeland.

Freeland was riddled with 68 bullets after SWAT team members saw a gun in his hand. Authorities later said the nine SWAT officers fired a total of 110 rounds at Freeland. He had been hiding under a log not far from where Williams was killed a day earlier.

Polk County sheriff's Maj. Marvin Pittman told a standing room only crowd at the service that William's killer was "languishing in torment" in hell.

Emotions at the hour and a half memorial service ranged from tears to laughter as friends and colleagues recalled Williams as an avid fisherman and mechanic and a gifted dog handler.

"He poured his heart and soul into his craft," said Deputy Mike Evans, Williams' longtime friend. "Matt was a jokester ... He had more ideas than Walt Disney ever could."

Williams raised Diogi from a puppy. They worked together for six years.

"He never deserted Matt, even in his darkest hour," Polk County sheriff's Sgt. Jim Bryan said of the dog. "He gave his life trying to save his friend and master."

A slideshow showed candid photos of Williams with his family and Diogi. Many in the crowd wiped tears away as Lionel Richie's "Endless Love" and Bob Carlisle's "Butterfly Kisses" played during interludes between eulogies.

Williams' wife, Nancy, and his three children, 19-year-old Christopher and 16-year-old twins Jimmy and Amanda huddled together in the front row of the church.

Authorities were unable to determine an exact number of people who attended the funeral. The massive church was filled to capacity and the crowd spilled out into the lawn. Police cruisers filled hundreds of yards in the parking lot and lined up for half a mile outside the church.

It took more than two hours for the funeral procession to travel 12 miles from the church to the cemetery. More than 200 police dogs joined more than a 1,000 officers who ringed Williams' grave. Nineteen police helicopters flew a missing man formation over the service, one helicopter peeling off to signify the slain deputy.

"It's a show of support. We're all in this together," said Port Richey Police Chief Bill Sager who came to the funeral with four of his department's 14 officers. "I've been to funerals — too many of them — and this one is particularly large."

Florida Attorney General Charlie Crist, the Republican nominee for governor, attended the memorial service in Lakeland.

"It's always a tragedy when this happens," Crist said. "I think it's important to pay our respects to the family."

Click here to visit FOXNews.com's Crime Center