The paper proposes moral and ethical guidelines for medical treatment at the edge of viability. The proposed principles are defended on the grounds of a general conceptual framework presented by elucidating the notions of viability, the edge of viability, person, sanctity of human life, dignity, and the slope of dignity protection, as well as the distinction between ethics and morality.