John Bolton, a former national security adviser to Donald Trump during his first presidential term, was sentenced to six months in prison and fined $2.25 million in a plea deal over retaining classified documents and showing some of the information to others.

Bolton also kept diary-like notes about events during his 17 months in the administration and showed them to two relatives. He included classified information in a book about Trump and his time in the administration. Prosecutors had initially sought a five-year prison sentence.

The judge said Bolton’s agreement to pay the large fine did not exempt him from prison, adding that there are no separate rules for powerful leaders.