We study a defaultable firm's debt priority structure in a simple structural model where the firm issues senior and junior bonds and is subject to both liquidity and solvency risks. Assuming that the absolute priority rule prevails and that liquidation is immediate upon default, we determine the firm's interior optimal priority structure along with its optimal capital structure. We also obtain closed-form solutions for the market values of the firm's debt and equity. We find that the magnitude of the spread differential between junior and senior bond yields is positively, but not linearly related to the total debt level and the riskiness of assets. Finally, we provide an in-depth analysis of probabilities of default and the term structure of credit spreads.