An internal combustion engine, comprising: an exhaust purification catalyst which is arranged in an exhaust passage of the internal combustion engine and which can store oxygen; a downstream side air-fuel ratio sensor which is arranged at a downstream side, in the direction of exhaust flow, of said exhaust purification catalyst and which is arranged to detect the air-fuel ratio of the exhaust gas flowing out from said exhaust purification catalyst; and an air-fuel ratio control system which is arranged to perform feedback control so that the air-fuel ratio of the exhaust gas flowing into said exhaust purification catalyst becomes a target air-fuel ratio, wherein said air-fuel ratio control system being arranged to: switch said target air-fuel ratio to a lean set air-fuel ratio which is leaner than a stoichiometric air-fuel ratio when the air-fuel ratio detected by said downstream side air-fuel ratio sensor becomes a rich judged air-fuel ratio, which is richer than the stoichiometric air-fuel ratio, or less; change said target air-fuel ratio to a lean air-fuel ratio with a smaller lean degree than said lean set air-fuel ratio at a predetermined lean degree changing timing after switching said target air-fuel ratio to said lean set air-fuel ratio and before an estimated value of said oxygen storage amount of the exhaust purification catalyst becomes a predetermined switching reference storage amount, which is smaller than a maximum storable oxygen amount, or more; and switch said target air-fuel ratio to a rich air-fuel ratio which is richer than the stoichiometric air-fuel ratio, when the estimated value of said oxygen storage amount of the exhaust purification catalyst becomes said switching reference storage amount or more. an exhaust purification catalyst which is arranged in an exhaust passage of the internal combustion engine and which can store oxygen; a downstream side air-fuel ratio sensor which is arranged at a downstream side, in the direction of exhaust flow, of said exhaust purification catalyst and which is arranged to detect the air-fuel ratio of the exhaust gas flowing out from said exhaust purification catalyst; and an air-fuel ratio control system which is arranged to perform feedback control so that the air-fuel ratio of the exhaust gas flowing into said exhaust purification catalyst becomes a target air-fuel ratio, wherein said air-fuel ratio control system being arranged to: switch said target air-fuel ratio to a lean set air-fuel ratio which is leaner than a stoichiometric air-fuel ratio when the air-fuel ratio detected by said downstream side air-fuel ratio sensor becomes a rich judged air-fuel ratio, which is richer than the stoichiometric air-fuel ratio, or less; change said target air-fuel ratio to a lean air-fuel ratio with a smaller lean degree than said lean set air-fuel ratio at a predetermined lean degree changing timing after switching said target air-fuel ratio to said lean set air-fuel ratio and before an estimated value of said oxygen storage amount of the exhaust purification catalyst becomes a predetermined switching reference storage amount, which is smaller than a maximum storable oxygen amount, or more; and switch said target air-fuel ratio to a rich air-fuel ratio which is richer than the stoichiometric air-fuel ratio, when the estimated value of said oxygen storage amount of the exhaust purification catalyst becomes said switching reference storage amount or more. switch said target air-fuel ratio to a lean set air-fuel ratio which is leaner than a stoichiometric air-fuel ratio when the air-fuel ratio detected by said downstream side air-fuel ratio sensor becomes a rich judged air-fuel ratio, which is richer than the stoichiometric air-fuel ratio, or less; change said target air-fuel ratio to a lean air-fuel ratio with a smaller lean degree than said lean set air-fuel ratio at a predetermined lean degree changing timing after switching said target air-fuel ratio to said lean set air-fuel ratio and before an estimated value of said oxygen storage amount of the exhaust purification catalyst becomes a predetermined switching reference storage amount, which is smaller than a maximum storable oxygen amount, or more; and switch said target air-fuel ratio to a rich air-fuel ratio which is richer than the stoichiometric air-fuel ratio, when the estimated value of said oxygen storage amount of the exhaust purification catalyst becomes said switching reference storage amount or more.