James C. McBride, the 25-year-old D.C. police officer who died last week after consuming too much water while training for a bicycle patrol, was remembered yesterday as a man so dedicated to law enforcement that he patrolled one of the city's toughest neighborhoods while pursuing a law degree.

Police Chief Charles H. Ramsey and hundreds of blue-uniformed officers came to All Souls Church, Unitarian on 16th Street NW, where McBride received a funeral with full honors because he died in the line of duty.

Above the street, a large U.S. flag hung from two fire engines. After the ceremony, McBride's coffin, draped with another flag, was carried from the church before rows of saluting officers and to the boom of a ceremonial canon. His remains will be cremated.

"He had a [D.C.] flag tattooed on himself," Ramsey told mourners during the ceremony while looking at McBride's parents, Kenneth and Jean, his brother, Michael, and McBride's fiancee, Monica Beck. "It showed how deeply he cared about the nation's capital and his role in securing the men and women who live and work here."

Ramsey and the Rev. Louise Green, who led the service, noted the shocking manner by which McBride, described as physically fit, died Wednesday. Doctors believe McBride's death was caused by hyponatremia, a sodium imbalance caused by drinking excessive amounts of liquid. He collapsed after drinking as much as three gallons of water during a 12-mile training ride, part of a weeklong course to prepare for bike patrol.

"This is a painful death, too early and too unbelievable -- the shock of it," Green said.

McBride, who was on the force for two years, was named the 1st Police District's rookie of the year in 2004. He patrolled Sursum Corda, one of the city's most crime-ridden housing complexes.

Edward D. Reiskin, deputy mayor for public safety and justice, said that crime there has decreased dramatically and that a recent survey of its residents revealed that they had gained a better image of police officers. "It's because of dedicated officers, officers like James McBride," Reiskin said.

Friends described McBride as a quirky boy growing up in Belmont, Mass., a Lego fanatic and an energetic student who played sports and participated in theater.

After graduating from American University with a degree in political science, McBride worked briefly at the D.C. Emergency Management Agency before joining the force.

He patrolled during the day and attended American University's Washington College of Law at night. Classmate Kelly McLanahan recalled when his motorcycle was stolen and he, by chance, found it in another part of town. Worried that he might wind up in an altercation with the thief, McLanahan called McBride, who immediately crossed the city to help resolve the situation.

Michael Fanone, McBride's police partner, recalled McBride's curious quirks, such as his love of Hawaiian shirts, which he wore even in winter, and his habit of buying the same meal every morning after roll call: a one-liter Diet Coke, a bag of long-stick pretzels, animal crackers and a Mr. Goodbar.

Much to Fanone's chagrin, McBride insisted on spreading out the food between them in their squad car and on top of his many papers, folders and other gear.

"Between this unique filing system and his inability to drive [well], I was constantly cleaning food from my lap," said Fanone, eliciting laughter from the mourners.

On the force, riding bike patrol is considered an honor that only the most able and dedicated officers achieve. The job can be especially dangerous, seeking out criminals who hide in places where police cars are not able to travel.

McBride repeatedly begged 1st District Cmdr. Thomas McGuire for a chance to ride the patrol.

"He'd stop by my office and say, 'Hey, Commander, c'mon, man, when are you going to send me to bike school?' " McGuire said. McGuire eventually relented.

"My only wish," McGuire said, "is to see his head pop into my office again and say, 'Hey, Commander.' "

Jean McBride leaves All Souls Church, Unitarian in Northwest after the funeral Mass for her son, Officer James C. McBride, who died during training.An honor guard stands by as fellow police officers carry the coffin of McBride, who suffered seizures Tuesday while training for bicycle patrol.McBride patrolled during the day and attended night law school.