Halfdan Mahler, a Danish physician who led the World Health Organization as it shifted its focus to primary care but acknowledged that its response to the AIDS crisis had been far too slow, died on Wednesday in Geneva. He was 93.

The death was announced by the W.H.O., which Dr. Mahler led from 1973 to 1988, its third director general. He was hospitalized on Saturday and slipped into a coma, his son Per Bo Mahler said.

Dr. Mahler was behind a major shift in priorities in 1978 toward primary care and away from communicable diseases, on which the organization, founded in 1948, had focused for decades, he explained in an interview in 2008. During those Cold War years, the two main superpowers had competed to combat disease: The United States took the lead on malaria, and the Soviet Union on smallpox. In 1977, Dr. Mahler declared smallpox to be largely eradicated.

“In the 1960s, member states started telling W.H.O. that it had failed to support them with their health services,” Dr. Mahler recalled in the interview. “In the 1970s, W.H.O.’s secretariat at last began to search for a balance between the vertical (single disease) programs and the horizontal (health systems) approach.”

The shift culminated in a declaration, made at a conference in the city now known as Almaty, Kazakhstan, affirming that “health, which is a state of complete physical, mental and social well-being, and not merely the absence of disease or infirmity, is a fundamental human right” and setting a global goal of “health for all” by 2000.

Critics felt that the goal was too vague. Dr. Mahler fell under criticism in Geneva for cutting staff and budgets at the organization’s headquarters and shifting resources toward six regional offices. The organization competed for resources with Unicef, whose executive director, the American lawyer James P. Grant, focused on interventions like vaccination campaigns and treatment for diarrheal diseases.

The emergence of AIDS, first identified in the United States in 1981, severely tested Dr. Mahler. It was not until 1985 that the W.H.O. announced that it had marshaled the resources needed for a global fight against the pandemic.

Later that year, he pleaded with scientists and health officials — including those who worked for him — to “sacrifice their own vanity conflicts” to come together. He admitted to “considerable anxiety” about the state of scientific knowledge and asked, “Do we have a willingness of the best scientists in the world to work together so that all areas will be able to benefit from their cooperation?”

In November 1986, Dr. Mahler spoke bluntly about the tardy response. “We’re running scared,” he said, and he could “not imagine a worse health problem in this century.” He added: “We stand nakedly in front of a very serious pandemic as mortal as any pandemic there ever has been. I don’t know of any greater killer than AIDS, not to speak of its psychological, social and economic maiming.”

Dr. Mahler also admitted that he had not taken the disease seriously enough. “Everything is getting worse and worse in AIDS, and all of us have been underestimating it, and I in particular,” he said.

In 1987, near the end of his third term, health officials began jockeying over the future of the organization. Dr. Mahler opted not to seek a fourth term. He was succeeded by a Japanese physician, Hiroshi Nakajima, who was picked over a Brazilian candidate backed by the United States. The American scientist Jonathan Mann, whom Dr. Mahler had hired to help lead the organization’s fight against AIDS, resigned in frustration shortly after.

In the 2008 interview, Dr. Mahler said that while health outcomes — as measured by longer life spans and reduced child and infant mortality — had gotten better in many of the world’s poorest countries, global primary care had not received enough support from the World Bank or the International Monetary Fund.

After retiring from the W.H.O., he directed the International Planned Parenthood Federation, in London, focusing on reproductive rights and family planning, until 1995.

Halfdan Theodor Mahler was born on April 21, 1923, in Vivild, a village on the Jutland peninsula of Denmark. He was the youngest of seven children, two of whom died young. Their father, Magnus Theodor Mahler, a Danish Baptist preacher, and their mother, Benedicte Olinka Ferdinande Marie Suadicani, came from a German family of physicians.

Dr. Mahler was guided by his father’s Protestant asceticism throughout his life. He began preaching at 15 but ultimately chose medicine over the ministry, graduating with a medical degree from the University of Copenhagen in 1948. He earned a postgraduate degree in public health and received a specialist training in tuberculosis.

After working on a campaign against tuberculosis in Ecuador, Dr. Mahler joined the World Health Organization in 1951 as a senior officer attached to the tuberculosis program in India. He moved to the organization’s Geneva headquarters in 1962 as chief of the tuberculosis program, a post he held until 1969. He then served as director of project systems analysis and as assistant director general of several divisions before the organization’s executive board selected him for the top job, in 1973.

Dr. Mahler’s wife, the former Ebba Fischer-Simonsen, a psychiatrist, whom he married in 1957, died last year. In addition to his son Per Bo, he is survived by another son, Finn, and five grandchildren.

Martin Selsoe Sorensen contributed reporting.

A version of this article appears in print on , on Page A30 of the New York edition with the headline: Halfdan Mahler, 93, World Health Official, Dies. Order Reprints | Today’s Paper | Subscribe