Understanding the key factors affecting COVID-19 outbreaks is essential for the control of this pandemic. Air pollution is one of the prime public health concerns influencing infectious diseases. This paper aims to investigate the association among air pollutants, particularly Ozone (O3) and PM2.5, and COVID-19 in Tehran, Iran. From May 13 to July 29, 2020, Tehran experienced unhealthy conditions caused by high levels of O3 and PM2.5, whereas other pollutants remained at safe levels. Using the generalized additive model (GAM), the daily numbers of newly confirmed COVID-19 cases during this period were analyzed. The GAM is indeed a semi-parametric flexible form of the generalized linear model (GLM) that handles linear and nonlinear relationships between dependent and independent variables. GAM allows a broad range of distributions for the response variable to be adopted and link functions for measuring the effects of the predictor. The link function is selected based on the distribution of the response variable. In this paper, the response, the daily confirmed cases of COVID-19, was counted and Poisson distribution with the log link function was used to fit the data. The results revealed that the association between O3, PM2.5, and daily confirmed cases of COVID-19 was statistically significant (adjusted R2= 33%), while other pollutants such as NO2 and PM10, CO and SO2 remained at healthy levels during the study period. The results of this study are essential for considering the effects of PM2.5 and, most especially, O3 on the incidence of COVID-19 and will aid in determining the necessary measures to be taken.