Rosemary Kennedy, the oldest sister of President John F. Kennedy who spent much of her life shielded from the public eye and struggling with mental retardation, died Friday. She was 86.

Kennedy, the third child of Rose and Joseph Kennedy, underwent a lobotomy when she was 23 and was a longtime resident of a Jefferson, Wis., institution, the St. Coletta School for Exceptional Children.

She died at Fort Memorial Hospital in Fort Atkinson, Wis., with her brother Sen. Edward M. Kennedy (D-Mass.) and her sisters by her side, the family said in a statement.

"Rosemary was a lifelong jewel to every member of our family," the statement said. "From her earliest years, her mental retardation was a continuing inspiration to each of us and a powerful source of our family's commitment to do all we can to help all persons with disabilities live full and productive lives."

Rosemary Kennedy's condition became an inspiration to her younger sister, Eunice Kennedy Shriver, who founded the Special Olympics for mentally disabled athletes. Shriver, the mother of California First Lady Maria Shriver, took over her sister's care in 1984 after their mother had a stroke.

Rosemary's condition became public in 1960, just after her brother John was elected president. The National Assn. for Retarded Children mentioned in a publication that the president-elect "has a mentally retarded sister who is in an institution in Wisconsin."

The following year, Shriver revealed more about her sister's story in an article for the Saturday Evening Post.

During the 1980s, Shriver involved Rosemary more in the lives of her siblings and their children, helping her to attend family gatherings more frequently.

Born Rose Marie Kennedy on Sept. 13, 1918, in Boston, she was known as Rosemary or Rosie to friends and family. In her own diaries before the lobotomy, she chronicled a life of tea dances, dress fittings, trips to Europe and a visit to the Franklin D. Roosevelt White House.

But as she got older, her father worried about his daughter's mild condition. Doctors told Joseph Kennedy that a lobotomy, a medical procedure in which the frontal lobes of a patient's brain are scraped away, would help his daughter and calm the mood swings that the family found difficult to handle at home.

Psychosurgery was in its infancy at the time, and only a few hundred lobotomies had been performed. The procedure was believed to be a way to relieve serious mental disorders.

Rosemary lived in several private institutions before her father placed her in St. Coletta, an hour west of Milwaukee. He oversaw construction of a private house there for Rosemary and two nurses. Later, the Kennedy family gave the institution $1 million, in honor of Rose Kennedy's 93rd birthday.

"We are forever thankful to the loving members of the St. Coletta community who cared for Rosemary, loved her, and in a very real sense became extended members of our family," the family statement said.

In addition to her brother Edward and sister Eunice, survivors include her sisters Patricia and Jean.