A light emitting diode comprising: a first semiconductor layer doped with an n-type dopant; a second semiconductor layer doped with a p-type dopant; an active layer disposed between the first semiconductor layer and the second semiconductor layer, the active layer being formed of In x Al y Ga 1-x-y N (0≤x≤1, 0≤y≤1, 0≤x+y≤1) and including a plurality of barrier layers (B1, B2, B3) and a plurality of well layers (Q1, Q2, Q3), the well layers (Q1, Q2, Q3) being interposed between the barrier layers (B1, B2, B3) and having a smaller bandgap energy than that of the barrier layers (B1, B2, B3); an intermediate layer interposed between the active layer and the second semiconductor layer, the intermediate layer being formed of In a Al b Ga 1-a-b N (0≤a≤1, 0≤b≤1, 0≤a+b≤1) and having a smaller bandgap energy than that of the barrier layers (B1, B2, B3), the intermediate layer doped with a p-type dopant; and a blocking layer disposed between the intermediate layer and the second semiconductor layer, the blocking layer being formed of In z Al w Ga 1-z-w N (0≤z≤1, 0≤w≤1, 0≤z+w≤1) and having a greater bandgap energy than that of each of the barrier layers (B1, B2, B3) and the intermediate layer, wherein an Al content of the intermediate layer is lower than that of the barrier layers (B1, B2, B3) and the blocking layer and is higher than that of the well layers (Q1, Q2, Q3), and wherein the blocking layer is doped with a p-type dopant, characterized in that the intermediate layer has an A1 composition ratio of 0.02 to 0.13, and wherein an A1 content of the barrier layers (B1, B2, B3) is higher than that of the well layers (Q1, Q2, Q3) and is lower than that of the blocking layer, and wherein the active layer produces UV light having a wavelength of 325 nm to 385 nm, and wherein the blocking layer has a constant bandgap energy therein, and contacts directly with the intermediate layer and the second semiconductor layer. a first semiconductor layer doped with an n-type dopant; a second semiconductor layer doped with a p-type dopant; an active layer disposed between the first semiconductor layer and the second semiconductor layer, the active layer being formed of In x Al y Ga 1-x-y N (0≤x≤1, 0≤y≤1, 0≤x+y≤1) and including a plurality of barrier layers (B1, B2, B3) and a plurality of well layers (Q1, Q2, Q3), the well layers (Q1, Q2, Q3) being interposed between the barrier layers (B1, B2, B3) and having a smaller bandgap energy than that of the barrier layers (B1, B2, B3); an intermediate layer interposed between the active layer and the second semiconductor layer, the intermediate layer being formed of In a Al b Ga 1-a-b N (0≤a≤1, 0≤b≤1, 0≤a+b≤1) and having a smaller bandgap energy than that of the barrier layers (B1, B2, B3), the intermediate layer doped with a p-type dopant; and a blocking layer disposed between the intermediate layer and the second semiconductor layer, the blocking layer being formed of In z Al w Ga 1-z-w N (0≤z≤1, 0≤w≤1, 0≤z+w≤1) and having a greater bandgap energy than that of each of the barrier layers (B1, B2, B3) and the intermediate layer, wherein an Al content of the intermediate layer is lower than that of the barrier layers (B1, B2, B3) and the blocking layer and is higher than that of the well layers (Q1, Q2, Q3), and wherein the blocking layer is doped with a p-type dopant, characterized in that the intermediate layer has an A1 composition ratio of 0.02 to 0.13, and wherein an A1 content of the barrier layers (B1, B2, B3) is higher than that of the well layers (Q1, Q2, Q3) and is lower than that of the blocking layer, and wherein the active layer produces UV light having a wavelength of 325 nm to 385 nm, and wherein the blocking layer has a constant bandgap energy therein, and contacts directly with the intermediate layer and the second semiconductor layer.