After failure of a trial of treatment with conventional oxygen therapy delivered through a face mask, with a FiO2 at least of 50% for 15 minutes, patients will be assigned into one of three groups:
* Group A: will receive first HFNC for 2 hours alternating with NIV for
1 hour. This alternating cycle of HFNC and NIV will be repeated for a total of 16 hours of HFNC and 8 hours of NIV for the first 24 hours.
* Group B: will receive first HFNC for 3 hours alternating with NIV for 3 hours. This alternating cycle of HFNC and NIV will be repeated for a total of 12 hours of HFNC and 12 hours of NIV for the first 24 hours.
* Group C (The control group): will receive conventional oxygen therapy and NIV as required for acute respiratory failure. Randomization will be performed using a computer-generated randomization sequence. HFNC therapy will be administered using the Vapotherm system (Vapotherm, INC. 100 Domain Drive. Exeter, NH 03833. Made In U.S.A.). This system allows for precise control of the fraction of inspired oxygen (FiO₂) and the delivery of heated, humidified gas via large-bore bi-nasal prongs. The initial flow rate will be set to 50 L/min with an FiO₂ of 0.5, and adjustments will be made to maintain SpO₂ ≥ 92%. If the initial settings are poorly tolerated by the patient, the flow rate and FiO₂ will be titrated to the maximum tolerated level, with a minimum flow rate of 30 L/min. Blood gas analysis will be performed within one hour of initiating HFNC to assess oxygenation, PaCO₂ and acid-base status. Continuous monitoring will be conducted throughout the session to ensure patient comfort and optimize therapeutic efficacy. NIV will be administered via a full-face mask connected to an ICU ventilator (TECME Corporation. Made In U.S.A. or Airliquide Medical Extend XT. Made In France.) equipped with a dedicated NIV mode and a heated humidifier (MR850, Fisher \& Paykel Healthcare), while patient positioned in a semi-recumbent position. The ventilator will be set to a pressure support level to achieve an expired tidal volume of 6-8 mL/kg of ideal body weight, with a target respiratory rate of \< 30 breaths per minute. FiO₂ will be adjusted to maintain SpO₂ at 92%, and PEEP will be set at least 4 cm H₂O. All patients will be continuously monitored for respiratory rate, heart rate, blood pressure, and SpO₂ throughout the study. Blood gas analysis will be conducted within one hour after the initiation of HFNC and NIV to assess oxygenation, ventilation, and acid-base status. If improvement in respiratory distress occurs, the noninvasive strategy will be stopped. Also, The study will be discontinued and invasive mechanical ventilation will be initiated if any of the following criteria are recorded: evident worsening of respiratory distress, breathing frequency of ≥ 40 breaths/min, abundant secretions, SpO₂ remaining below 92% despite an FIO₂ of 1.0, or pH ≤ 7.35, Glasgow Coma Scale score \< 8/15 or psychomotor agitation hindering nursing care, bradycardia (heart rate \< 50 bpm), tachyarrhythmia (heart rate \> 150 bpm), persistent hypotension (defined by systolic blood pressure \< 90 mmHg or mean arterial blood pressure \< 65 mm Hg, despite fluid resuscitation or need for vasopressors), respiratory or cardiopulmonary arrest