The ribs protect the heart, liver, kidneys and the lungs from any external injury. Ribs also assist in breathing when the intercostal muscles lift and lower the ribcage, facilitating inhalation and exhalation. The ribcage provides a framework onto which the muscles of the chest, back, upper abdomen and shoulder girdle can attach. The diaphragm is also attached to the lower border of the ribcage.