The strange criminal odyssey of David B. Harrington ended in Montgomery County Circuit Court yesterday as the former Silver Spring private school principal was sentenced to 25 years in prison for molesting six boys he met through the Big Brothers program and for stealing about $7,000 in student ski trip money.

Harrington, 44, became a respected educator and principal at the Hebrew Academy of Greater Washington after faking his own death in Vermont in 1970 to avoid questioning in another child molestation case. He was arrested here last Feb. 28, but disappeared and fled to Puerto Rico before surrendering five weeks later.

"I'm ashamed for what I've done, and I'm ashamed for not having the strength to stop it," Harrington, his voice breaking, said in a brief statement to Judge James S. McAuliffe. "But I think there is good inside me, and I hope someday I can show that to you and to my family."

He also submitted a long letter to McAuliffe, which the judge declined to make public. Harrington showed no reaction when McAuliffe imposed the sentence after the three-hour hearing.

"It's been said here that you are a classic fixated pedophile," McAuliffe told Harrington, who was himself a victim of child sexual abuse, according to the testimony of two psychiatrists yesterday.

The 25-year prison term was the maximum Harrington could have received under a plea bargain with the state's attorney's office. The judge also ordered Harrington never to have contact with a child 16 years or younger without another adult present.

His lawyer, Robert Morin, said he plans to appeal the severity of the sentence.

Harrington, Montgomery County's 1986 Big Brother of the Year who was honored by President Reagan at a White House reception last year, was arrested on charges of molesting six children assigned to him by the Big Brothers program, which seeks to match fatherless boys with volunteer men who can serve as adult role models. He was fired by the Hebrew Academy, where he had been high school principal since 1980.

While free on bond, Harrington attracted wide publicity by fleeing from Maryland with an estimated $16,000 -- about $7,000 of which youngsters had entrusted to a student travel agency that Harrington operated as a sideline. He surrendered after five weeks as a fugitive, saying he had squandered the money gambling in Puerto Rico and had contemplated suicide.

County police detectives, piecing together his background while he was on the run, learned of the 1970 Vermont episode in which he faked his drowning on the day before he was scheduled to take a polygraph examination. They also discovered that several months before the Vermont disappearance, Harrington had been sentenced to 30 days in a Connecticut jail after pleading guilty to violating a child-abuse statute.

Assistant State's Attorney Kathleen Toolan recommended yesterday "a substantial period of incarceration" in state prison, telling Judge McAuliffe: "Mr. Harrington is an adult. Mr. Harrington knew right from wrong. Mr. Harrington knew what he was doing was wrong."

Morin asked the judge not to impose a fixed sentence until Harrington had been evaluated psychologically at the Maryland Reception Diagnostic Classification Center in Baltimore, where new inmates undergo testing before being assigned to prisons.

He said his client, as an admitted child molester awaiting sentencing, has been subjected to daily harassment by prisoners at the Montgomery County Detention Center and could expect even worse treatment from other inmates if sentenced to a state prison.

The psychiatrists who testified yesterday described Harrington as a pedophile who had been molested once at age 13 by a neighbor. They said the incident -- and his upbringing by alcoholic parents -- may have contributed to his disorder.

In imposing the 25-year sentence, McAuliffe said he would recommend that Harrington remain at the classification center until space becomes available at the Patuxent Institution in Jessup, a maximum-security prison specializing in the treatment of emotionally unbalanced inmates.

Harrington pleaded guilty to molesting six boys, ages 10 to 17, between 1982 and this year. According to court documents, he plied them with beer and wine and allowed them to watch adult movies in his Germantown home.

Toolan, the prosecutor, told McAuliffe yesterday that Harrington videotaped some sex acts with the boys.

In exchange for his guilty pleas to six counts of child abuse, the state's attorney's office agreed not to prosecute him for several lesser crimes related to the molestation of the boys. He also was guaranteed that he would not serve more than 25 years in prison.

By the time Harrington agreed to the plea bargain in August, the darker side of his past had come to public light.

On Aug. 18, 1970, Harrington, then a 26-year-old high school mathematics teacher in Vermont, disappeared the day before he was to take a polygraph test in a molestation case in the town of Shelburne. Police found his car abandoned by the edge of Lake Champlain, and his boat and water-soaked shirt were discovered on a nearby island. He was presumed to have drowned.

Only after his arrest in Montgomery this year did Harrington's parents and Vermont authorities learn that he was alive.