Image copyright Getty Images Image caption Rehnquist and Mrs O'Connor stand beside each other (back row right) in this 1982 photo

Decades before serving together on the US Supreme Court two future judges were involved in a romance that led to a marriage proposal, a new book finds.

Sandra Day O'Connor, the top court's first female justice, and former Chief Supreme Court Justice William Rehnquist had dated in university back in 1949.

The O'Connor family says the fact that the late justice had asked her to marry him was not well known.

It was discovered in letters exchanged between the two top arbiters.

Author Evan Thomas unearthed the proposal while he was conducting research for a biography of Mrs O'Connor called First, which will be published in March 2019.

Mrs O'Connor, 88, who was nominated to serve on the Supreme Court in 1981 by President Ronald Reagan, was a "study buddy" with Rehnquist during their time at Stanford Law School, Mr Thomas writes.

The two shared notes, and later dated, but had broken up by the time the future chief justice graduated and travelled to Washington to work as a clerk at the Supreme Court.

The two remained close friends, however, all the way up to Rehnquist's death in 2005.

Rumour has it that after joining the court in 1972, Rehnquist lobbied President Reagan to appoint his old friend.

Image copyright Getty Images Image caption Mrs O'Connor and Rehnquist break ground for a Supreme Court expansion in 2003

In a letter he sent to Mrs O'Connor in the early 1950s, shortly after Mrs O'Connor had begun dating her future husband, Rehnquist wrote to ask if they could discuss "important things".

"To be specific, Sandy, will you marry me this summer?"

Mrs O'Connor's son Jay told NPR - which first revealed the proposal - that he and his siblings were "surprised" to learn of the attempted engagement.

But, he noted, it "was a different era" back then.

Image copyright Getty Images Image caption O'Connor (second from left, first row) and Rehnquist (back row, furthest left) studied at Stanford together

"Dating was pretty innocent in the '50s," he said, adding that "multiple men proposed to my mom when she was in college and law school, and ultimately my dad was the one who was the real deal".

According to the author of the biography, before Rehnquist died, he told a friend that his wife Nan was the only woman that he ever loved.

Despite the rejection, Jay O'Connor called it an "amazing accident of history that... my mom and her friend and law school classmate ended up on the Supreme Court together".

"Not only did they have a wonderful working relationship for over 25 years on the court, they had a wonderful friendship their entire life."

Last week, Mrs O'Connor announced that she was withdrawing from public life after being diagnosed with dementia.