Abstract Background: the ventilator-associated pneumonia (VAP) and the hospital-acquired pneumonia (HAP) are significant public health issues worldwide and associated with increased mortality and increased hospital costs. Objective: to demonstrate the incidence, risk factors and possible causative agents of nosocomial pneumonia (HAP and VAP) in adult patients who were hospitalized in both medical wards and ICUs of a general hospitals in Tripoli/ Libya. Methods: hospital-based-records for admitted cases specifically to medical wards and/ or ICUs, who developed HAP or VAP (as defined by the American thoracic society (ATS) and the infectious diseases society, IDSA). Results: out of a total of 109 patients admitted over a period (from February 2018 to October 2019) ninety four cases (86.2%) had VAP and only fifteen patients (13.7%) had HAP. The onset of pneumonia after admission varied among the cases. Many patients in the ICUs have received different indwelling devices, nearly 75 patients with endotracheal intubation or tracheostomy (68.8%), 66 patients with nasogastric intubation (60.5%) and 70 patients with urinary catheterization (64.2%). Conclusion: in this study the incidence of HAP was significantly lower than VAP. Nonetheless, receiving proton pump inhibitor, nasogastric tube, endotracheal intubation and or using opened suction tube system all of these were found as predisposing factors that increase the incidence of HAP and VAP at Tripoli hospitals.