Can long-term stress lead to anxiety or depression?

How does long-term, unmanaged stress affect mental health, and can it eventually lead to anxiety or depression?