Warning: this story contains content which some readers might find distressing

A US judge has ordered the release of a document purported to be a suicide note written by convicted sex offender Jeffrey Epstein a month before his death.

A copy of the handwritten note unsealed on Wednesday mentions a months-long investigation that "found nothing", and says "it is a treat to be able to choose one's time to say goodbye".

Epstein's former cellmate claims he found the note tucked into a book after Epstein tried to kill himself in July 2019. Epstein was found dead in his cell a month later.

The BBC has not verified that the note was written by Epstein, and US authorities have not commented.