SAO PAULO/BRASILIA (Reuters) - A Brazilian judge ordered the release of former president Luiz Inacio Lula da Silva from prison on Friday, according to a court document, following a Supreme Court ruling ending the mandatory imprisonment of convicts after they lose their first appeal.

Reporting by Eduardo Simoes and Ricardo Brito Our Standards: The Thomson Reuters Trust Principles.