Robert S. McNamara, the tragic and controversial former Secretary of Defense under Presidents John F. Kennedy and Lyndon B. Johnson, who was most closely associated with leading the country into the Viet Nam War, died yesterday morning at his home in Washington, D.C., after a long period of failing health.

He was 93 and was a former longtime summer resident of the Vineyard.

Controversial Secretary of Defense at Harvard Yard in 1965. — Peter Simon

“The war became his personal nightmare,” declared a story in the New York Times yesterday in reporting the news of Mr. McNamara’s death. “Nothing he did — none of the tools at his command — the power of American weapons, the force of technology and logic or the strength of American soldiers — would stop the armies of North Viet Nam. He concluded well before leaving the Pentagon that the war was futile, but he did not share that insight with the public until late in life.”

In his 1995 memoir In Retrospect Mr. McNamara confessed his own personal stand against the war that killed 58,000 Americans and three million Vietnamese. The book drew fresh fury from his many critics.

On the Island Mr. McNamara had his own colorful and somewhat infamous personal history, including the flap in the 1970s when he tried to block sunbathers from his recently purchased Chilmark beachfront property. And then there was the September night in 1972 when he fended off an irate Vineyarder who tried to throw him overboard from the ferry Islander, losing his trademark wire-rimmed glasses in the scuffle.

No one knows exactly what stirred the West Tisbury artist who lured Mr. McNamara outside the lunchroom on the Vineyard Haven-bound ferry that night. Was it the Viet Nam War? Was it Mr. McNamara’s attempt to close off access to his Chilmark beach?

And the artist has never allowed his name to be published in connection with the incident, adding to the mystique of the whole affair.

A Washington Post magazine writer later tried to recapture the event. “The word counterculture doesn’t seem to fit the artist anymore,” wrote Steve McCracken in 1987. “One night, five or six years after the incident, the artist is sitting in a restaurant in Edgartown, having dinner with friends. He looks up and there, at another table, no more than six feet away, is Robert McNamara. The artist nods, almost imperceptibly. Both men go back to their dinners. Their eye contact has lasted only a second.”

Robert Strange McNamara was born June 9, 1916 in San Francisco to Robert and Clara Nell (Strange) McNamara. His father was the son of Irish immigrants and managed a wholesale shoe business.

In 1937 he graduated with honors in economics from the University of California at Berkeley. He enrolled at Harvard Business School and after two years there took a job with the accounting firm Price Waterhouse and Co. He returned to Harvard in 1947 to teach in the business school. In the same year he married his college sweetheart, Margaret Craig, who later became noted for creating Reading is Fundamental, a literacy program for poor children.

During World War II he taught young air officers, serving in England and India and achieving the rank of lieutenant colonel by the end of the war.

Following the war he took a job with the Ford Motor Company and in 1960 was named president of the company. Five weeks later newly elected President John F. Kennedy tapped him to run the Pentagon.

“Mr. McNamara’s time at the Pentagon came close to breaking his spirit,” The New York Times reported yesterday.

After his years as Secretary of Defense he spent 13 years as president of the World Bank.

He left the bank after his wife died in 1981.

The McNamaras first began visiting the Vineyard in the early 1960s.

In 1961 Mr. McNamara joined a consortium of 13 people to buy 460 acres of wild and pristine sandplain from George D. Flynn in the Oyster Watcha Midlands in Edgartown. The group included the late Katharine Graham, publisher of The Washington Post.

Henry Beetle Hough, the late editor of the Gazette, wrote at the time that the purchasers “are all conservationists and lovers of the Vineyard, the type who will respect this beautiful area and treat it accordingly.”

In 1971 the McNamaras bought property on the Chilmark South Shore in a complicated group purchase that included 40 acres of Lucy Vincent beach. The buyers gave half a mile of beach, 12 acres behind it and a 1,000-foot parking lot to the Chilmark Town Association. The association, in turn, leased the property to the town for a nominal fee.

The transaction included restrictions on prospective beach-users, prompting an outcry from Islanders — especially nude bathers — who had been accustomed to using Jungle Beach, as it was known at the time.

“Robert McNamara Replies to Beach Rules Criticism,” a Gazette headline blared in December of 1972.

The buzz and chatter about Mr. McNamara and his beach went on for years.

“The question of Lucy Vincent beach was at least two questions,” wrote Joe Lelyveld in a column in The New York Times Sunday magazine in 1977.

“There was the question of whether the Creator, having created beaches, had intended them for all his creatures or only those who could meet the mortgage payments and property taxes that come with a piece of choice Vineyard shorefront. Then there was another question — whether that debate wasn’t an unseemly pretext to invade the privacy of a Chilmark landowner who was vulnerable to controversy because his name was Robert S. McNamara.

“The question of whether McNamara was a scapegoat or an abuser of nature’s bounty was sustaining entertaining conversation at some of the Vineyard’s finest tables.”

In 1979 the McNamaras sold their Chilmark house to John and Judy Belushi for $425,000, and left the Vineyard for a brief period.

A few years after Margaret McNamara died Mr. McNamara, wanting to return to the Vineyard, decided to build a house on his property at Oyster Watcha. Named Sandpiper Point, the modest contemporary home was used by President Clinton and his family as the first Summer White House in 1993.

“Mr. McNamara’s love affair with the Vineyard lasted the better part of ahalf-century, often a time of great turbulence and division in the nation’s history,” recalled Gazette publisher and former editor Richard Reston yesterday. He continued:

“He came to the Vineyard for refuge and to escape the glare of political warfare in Washington and around the world. He had every reason tobecome a recluse on the Island. Many celebrities do and are easily forgiven in those ever-present battles to protect their right to privacy.

“But despite the burdens of celebrity, the late defense secretary chose not to retire behind the hedgerows of his Island enclaves. His life on the Vineyard was about as normal as just about any other summer visitor to the Island. He cared deeply about the Vineyard and that was most obvious at social occasions when he joined friends for dinner and an evening of casual conversation and companionship at the homes of Island acqua intances. Mr. McNamara lived in the Oyster-Watcha area off the Edgartown-West Tisbury Road and frequently he spent evenings at the nearby home of his great friend, Cyrus R. Vance, the late former secretary of state under President Carter.

“A visitor at those dinners would expect long conversations about Washington politics and the state of the VietNam War, indeed the state of the nation. But more often than not, the conversation at those dinners would turn to the state of the Vineyard and the need to preserve the Island in the face of heavy assault from min dless development. Always Mr. McNamara was outspoken about the need to rally the community’s environmental forces and, more importantly, about the obligation of the Vineyard’s seasonal residents to give something back to the Island and her citizens.”

He is survived by a son, two daughters and his second wife.