Slain Massachusetts Institute of Technology police officer Sean Collier was remembered Wednesday for his dedication to law enforcement and his love of people as thousands gathered at a campus memorial.

Vice President Joe Biden joined students, faculty and staff, and law enforcement officials from across the nation at Briggs Field for the service to honor an officer who was already respected by his colleagues and superiors, and popular with students after little more than a year on campus.

Collier was fatally shot April 18, three days after the Boston Marathon bombings that killed three people. Authorities said he was shot by brothers Tamerlan and Dzhokhar Tsarnaev. Dzhokhar Tsarnaev was charged Monday in his hospital room, where he is in fair condition. His brother, 26-year-old Tamerlan, died Friday after a gunbattle with police.

“My heart goes out to you,” Biden told Collier’s family. “I hope you find some solace in this time of extreme grief.”

Biden called the brothers suspected in the bombings and Collier’s killing “two twisted, perverted, cowardly, knock-off jihadis.”

He said he is often asked why terrorists do what they do against the U.S.

“I’ve come to conclusion they do it to instill fear,” Biden said. “To have us, in the name of our safety and security, jettison what we value most in the world, our open society, our system of justice that guarantees freedom. … Our transparency; that’s their target.

“It infuriates them that we refuse to bend, refuse to change, refuse to bend to fear.”

Collier’s casket was positioned in front of the thousands who gathered on a bright, sunny spring day. Music of bagpipes echoed through the field and a large American flag, suspended above the crowd between two fire department ladder trucks, flapped slowly in the breeze.

Boston native James Taylor sang “The Water is Wide” and led a singalong during “Shower the People.”

Biden told the Colliers that no child should die before their parents.

“The moment will come … when the memory of Sean is triggered and you know it’s going to be OK,” Biden said. “When the first instinct is to get a smile on your lips before a tear to your eye.”

Andrew Collier said his 27-year-old brother would have loved everything about the day, including the bagpipes and the American flag.

“He was born to be a police officer and lived out his dream,” Andrew Collier said.

MIT President L. Rafael Reif said Collier made countless friends on campus.

“Sean Collier didn’t have a job at MIT, he had a life at MIT,” Reif said. “In just 15 months, he built a life with us. He touched people across our community.”

State police said between 4,000 and 5,000 attended the service. The line of mourners stretched for about a half mile at MIT ahead of the service. They had to make their way through tight security, including metal detectors and bomb-sniffing dogs.

“He is the one of the nicest people that I’ve ever met,” said Kelly Daumit, 25, of Seattle, an engineering student at MIT who had gone on hikes with Collier as part of the MIT Outing Club.