Austin Deeds was writing a symphony for the banjo, helping homesick youngsters embrace summer camp — and privately plunging deeper and deeper into mental illness.

Before stabbing his father, Virginia state Sen. R. Creigh Deeds, and taking his own life this week, Austin Deeds was a quirky, gifted young man with interests and talents so diverse that he majored in geology at the College of William & Mary before switching to music.

He was always offbeat — committing to wear shorts every day one year in high school, even in winter, and pairing them with mismatched knee socks. With his friendly manner, strong Southern drawl and knack for impromptu songwriting, he conveyed his own brand of Appalachian cool.

“He had always been quirky but in the most endearingly amusing way,” said Tony Walters, a close family friend who has known him since childhood and attended William & Mary one year behind him. “He had his own goofy style.”

Walters spoke about his friend in an interview Friday, three days after an altercation between father and his son outside the family home in rural Bath County escalated.

Creigh Deeds was released from the hospital Friday. In a Twitter message, he wrote: “I am alive so must live. Some wounds won’t heal. Your prayers and your friendship are important to me.” He posted the same message on his Facebook page and drew hundreds of responses.

Deeds, 55, the 2009 Democratic nominee for Virginia governor, had been hospitalized since Tuesday, when he was repeatedly stabbed in the face and chest. Austin, 24, was later found inside the family home dying of a self-inflicted gunshot wound, authorities said.

Austin Deeds had undergone a psychiatric evaluation Monday, and a magistrate judge issued an emergency custody order. But Deeds nevertheless returned home that evening. Officials initially said that was because no psychiatric bed could be located. But three nearby hospitals confirmed that they had space but never were contacted.

Gov. Robert F. McDonnell (R) and the state’s inspector general have launched separate investigations into the case.

The incident has drawn attention to the state’s years-long effort to create a database to provide local mental health officials with real-time information about available psychiatric beds across the state. State officials, speaking on the condition of anonymity in order to discuss a sensitive matter, said it has been an on-again, off-again project for at least two years.

Officials hope to roll it out in a matter of weeks, but also caution that the system will not be a cure-all. Even after a hospital with an available bed is located, there will have to be in-depth discussions about whether the facility is equipped to handle a particular patient.

Against that backdrop, some who were close to Austin Deeds said he should be remembered as a brilliant musician and kindhearted camp counselor who also happened to be stricken by bipolar disorder.

Philip P. Coulling, director of the summer camp that Austin Deeds attended as a child and where he later worked as a counselor, said he had a way with campers who were homesick or struggling to fit in, engaging them with music or the subjects he taught to campers: ornithology, botany and geology.

Deeds “really excelled at seeking out those who he perceived might be having trouble making the adjustment,” said Coulling, director of Nature Camp, located in Vesuvius in Rockbridge County.

“He was a fabulous storyteller even at a young age,” said Coulling, who first met Deeds when Deeds was a teenage camper. “I recall standing on the dirt road that runs through the camp and he crouched down and grabbed a stick and in the gravel, he drew a little map of Bath County and where his family was from, and where the ridge was and who lived on this side and who lived on that side.”

Coulling said, “Here was a 17-year-old boy who knew so much about his family and cared so much about his family. I thought at that particular time, ‘I want him to be a counselor so other campers can have a chance to learn something from him.’ ”

The valedictorian of his class at Bath County High School, Deeds spent two successful years at William & Mary, Walters said. He took off the fall of 2009 to accompany his father on the campaign trail and intended to return that spring. But after his father’s devastating 17-point loss to McDonnell and his parents’ divorce soon afterward, he did not.

Some time after that, Austin Deeds announced that he’d become a born-again Christian, taking off on a cross-country trip in a green jalopy that Walters said had “just about as much character as [Deeds] did.”

“He went on this big trip . . . because he said God was telling him to see the Pacific.”

The ad­ven­ture struck family and friends as strange, but they were not immediately worried because Austin had always been known for passionate, diverse interests. But soon he showed signs of paranoia, Walters said.

“He became very mistrustful of people close to him,” Walters said.

Sometime in 2010, he was diagnosed with bipolar disorder, spent time in a psychiatric institution and started taking medication, Walters said. He was good about taking his medication for a while, but sometimes the side effects deterred him.

“It dulls your personalty and keeps you from feeling much of anything at all,” Walters said. “There were times when he seemed to be a little more manic where he understandably did not want to get help.”

Even so, it seemed as though things were getting better. He returned to Nature Camp, where he continued to be a big hit with the kids, and was back at William & Mary in the fall.

A few weeks ago, Walters, who has since graduated from college, heard from his parents that Deeds had dropped out again.

“I was really wondering what was going on and meaning to check in with him,” he said.

Jennifer Jenkins contributed to this report.