Jacqueline Kennedy Onassis in New York in 1992, left, and Carly Simon in Beverly Hills in 2016. (AP)

Carly Simon, the 1970s rocker best known for her hit “You’re So Vain,” is writing a memoir about a surprising friendship she had with another very famous woman: former first lady Jacqueline Kennedy Onassis.

The “intimate, vulnerable” memoir was announced Monday by publisher Farrar, Straus and Giroux. Simon will detail “the bond that grew between two iconic and starkly different American women,” according to the book’s publisher.

“She arrived when I least expected to make a new friend and she stayed up until the time of her death,” Simon said in a statement.

The singer and Jackie O. met at a summer party on Martha’s Vineyard, an encounter that led to an “improbable, but lasting friendship.” Simon, 73, described Onassis, who died in 1994 at age 64, as both a “protective mother figure” and “mischievous pal.” Onassis, who worked as a book editor in New York, also edited Simon’s children’s books published in the ’80s and ’90s.

The new memoir, named “Touched by the Sun” after a famous Simon song, is scheduled to hit shelves on Oct. 22. In that song, released the same year Onassis died, Simon sings the lyrics: “I’ve got to learn from the greats / Earn my right to be living.”