C. Everett Koop, 96, a courageous and brilliant pediatric surgeon who pioneered techniques for operating on newborn babies and became an outspoken surgeon general on issues from smoking to AIDS, died Monday in New Hampshire.

Dr. Koop was one of the first surgeons to devote a career to treating children. In 35 years at Children's Hospital of Philadelphia, he established the first neonatal intensive-care unit in the nation and won global renown for performing operations - such as the separation of conjoined twins - that had rarely, if ever, been done.

With his historic operations on birth defects in the 1960s and 1970s, Dr. Koop made Children's a latter-day Lourdes where anguished parents came seeking medical miracles.

As U.S. surgeon general from 1982 to 1989, he spoke out against smoking, teen suicide, and domestic abuse, as well as drunk driving and the lack of health insurance.

And he put aside his fundamentalist Christian beliefs and conservative political views to treat such subjects as abortion and AIDS as public health issues, not moral or political ones.

He saw no contradiction between his Christian beliefs and his public activities. "All I have done is face the issues that were there and deal with them with as much integrity and honesty as I could, and I'm somewhat surprised that everybody thinks I am so unusual," Dr. Koop said.

At 6-1, and 210 pounds, with a square Lincolnesque beard, a ringing voice, piercing eyes, and a shoulders-back, chin-up military bearing, Dr. Koop reminded people of a biblical prophet or a stern Puritan figure. When he was surgeon general, he liked to heighten the effect of his bearing by wearing the white uniform of his office.

Charles Everett Koop was born in 1916, the only child of a banker and a homemaker. He received his undergraduate degree from Dartmouth College, where he also got the nickname Chick, short for "chicken Koop," which stuck for life. He got his medical degree from Cornell Medical College. While at Dartmouth, he met Elizabeth Flanagan, a Vassar student, and they married in 1938.

After interning at Pennsylvania Hospital, Dr. Koop joined Children's in 1948, the staff's first pediatric surgeon. For a time, he was the hospital's entire surgery department. When he retired at 66, he presided over 26 full-time surgeons in eight specialties.

Dr. Koop was a pioneer in surgery on newborns, developing techniques for birth defects that, before him, had meant certain death.

The parents of ailing children saw him as heroic. He achieved national prominence in 1974, when he headed a team of 20 surgeons that separated conjoined twin girls who had been born in the Dominican Republic.

Dr. Koop did not think of his patients as numbers and did not forget them. He flew to the Dominican Republic to attend the funeral of one twin and later defended the mother from criticism that she had failed to properly supervise the tot.

To save a life, he did not always follow the rules. In a 1968 interview in Philadelphia Magazine, he told how, on an icy night in 1953, he had received a call from Pennsylvania Hospital about a newborn who had been delivered with abdominal organs in the chest.

Within minutes, Dr. Koop drove to the hospital, parked his car on the sidewalk, and raced to the delivery room. He wrapped the baby in a blanket, placed it on the floor of the car near the heater, and drove back to Children's.

He took no X-rays. He carried the baby to the operating room, opened the chest, put the organs in their proper place, repaired a hole in the diaphragm, and closed it back up.

He had broken all the rules, he said, and would not have followed that procedure at the time of the interview. "On the other hand," he said, "we had a living baby."

He rejected abortion and abhorred amniocentesis, a test to see if a fetus has genetic defects. He labeled it "a search-and-destroy mission." Most women who have amniocentesis did not keep their babies if a defect was found, he noted. "Many of the congenital defects are things that I have spent my entire life correcting," he said.

Dr. Koop's beliefs were supported by his religious faith. He said he became a practicing Christian when he heard the preaching of the late Rev. Donald Barnhouse, then pastor of the Tenth Presbyterian Church in Philadelphia, about 1948.

He said he and his family intensified their religious studies in 1968, when his 20-year-old son, David, died in a mountain-climbing accident. Another of his sons, Norman, became a Presbyterian minister, and Dr. Koop used to listen to his sermons on his tape deck as he drove to work.

After reaching the mandatory retirement age in the early 1980s, he left Children's and began a career as a crusader against abortion and the medical practice of letting defective newborn children die.

To make the point, Dr. Koop toured America with a multimedia program called "Whatever Happened to the Human Race?" It was meant to expose what he considered the diminished value placed on human life.

This was the man President Ronald Reagan nominated to be surgeon general. The choice elated conservatives and those who wanted abortion and homosexuality condemned.

The nomination was equally repugnant to many others, who saw Dr. Koop as inflexible and feared that the office would become more political than scientific.

After keeping him on hold for more than 10 months, the Senate yielded. He was confirmed.

And he surprised everybody.

His office compiled a report on AIDS that recommended the use of condoms to reduce the risk of transmitting the AIDS virus and endorsed giving schoolchildren clear guidance on how the disease is spread.

His work secured his reputation as an independent voice.

He was then accused by conservatives of abandoning his beliefs.

"What beliefs?" Dr. Koop said later. "I'm a physician who sees people in distress. I deal with those people."

He also disappointed the Reagan White House, which had commissioned a study on the physical and psychological effects of abortion on women.

The administration expected Dr. Koop to produce an antiabortion document. Instead, he wrote that abortion was medically safe and that studies on its long-term psychological effects were inconclusive.

Dr. Koop used his office to speak out on other difficult issues, too.

He criticized the nation's health-care system under which insurers cover those who need it least and leave millions of Americans with no insurance at all.

"Insurance for public health in this country often operates like a shell game, and it is a national disgrace," he said. Medicaid, he said, was a "fraud" that excludes too many poor people with unrealistic poverty caps.

When he resigned in 1989, Dr. Koop said he felt that his campaign against cigarette smoking was his biggest success in office.

Though he thought he had done a good job as surgeon general, he was disappointed when he left office. President George H.W. Bush did not appoint him secretary of health and human services, a job he coveted.