Inclusion Criteria:  patients with a history of COPD consulted the emergency department for AECOPD defined by a respiratory rate >25c/min, SaO2 <90%, pH <7.35 and PaCO2 >6kPa were included.  Exclusion Criteria:  hemodynamic instability requiring the use of vasoactive drugs patients with contraindications to NIV (Glasgow score <12, swallowing disorder or severe bronchial obstruction, vomiting, and those with upper airway obstruction or ongoing upper gastrointestinal bleeding and altered bronchial clearance) non cooperative patients who refused to give consent.