John Carl Warnecke, a San Francisco-based architect whose friendship with the Kennedy family led to some of his best-known designs, including Washington’s historic Lafayette Square and the Kennedy gravesite at Arlington National Cemetery, died April 17 at his family ranch in California’s Sonoma County. He was 91 and had pancreatic cancer.

In a career spanning more than 45 years, Warnecke made a name for himself as an architect whose modernist approach was tempered by a sensitivity for history and the environment. He built one of the country’s largest architectural concerns, John Carl Warnecke and Associates, which took on projects as diverse as skyscrapers, airports, libraries, civic complexes and shopping centers.

In the mid-1950s, he won a commission to build the U.S. Embassy in Thailand. His design, described in The New York Times as “a kind of floating pagoda rising up on slender white stilts,” received wide acclaim.

But it was a trip to Washington in the early 1960s that launched Warnecke into the orbit of the Kennedy family. In town to judge a design contest, he accompanied an old friend — Paul Fay, John F. Kennedy’s undersecretary of the Navy — to the White House.

Kennedy, who had studied at Stanford University before World War II, recognized the 6-foot-3 Warnecke as a onetime Stanford football hero. When Kennedy discovered that Warnecke was an architect, he asked him to help with a problem.

The General Services Administration planned to raze the historic townhouses lining Lafayette Square just north of the White House, replacing them with behemoth federal office buildings.

Warnecke proposed to renovate the rowhouses and build office buildings behind them, maintaining the square’s sense of the past. The plan was hailed as an elegant solution to the problem of historic preservation in an age of urban renewal.

Warnecke grew so close to the president and his wife that after Kennedy was killed in 1963, Jacqueline Kennedy chose Warnecke to design her husband’s gravesite. His simple plan for a prominent green slope at Arlington National Cemetery was universally praised as an exercise in restraint.

In his yet-to-be-published memoir, “The Right Place: Life, Love and Architecture,” he wrote of his affair with Jacqueline Kennedy, with whom he’d fallen in love while the two were working closely to plan the Kennedy family gravesite in the mid-1960s. They saw each other for more than a year, he wrote.