Image compression is a very important issue for several applications in the area of multimedia communications, the objective being reduction of storage and transmission costs. Many efficient coding techniques have been developed for various applications. Amongst them, the Joint Photographic Experts Group (JPEG) has been recommended for compression of continuous tone still images. However, the reconstructed images from JPEG compression produce annoying blocking artifacts near block boundaries, particularly in highly compressed images, because each block is transformed and quantized independently. Several techniques/algorithms have been proposed by researchers, both in spatial and frequency domains, for reduction of these artifacts with varied degree of success. These are briefly overviewed here. A new technique working in frequency domain, is proposed here by authors. This paper puts forth a method and an algorithm, working in frequency domain, for the detection and reduction of such blocking artifacts. These artifacts are modeled here as 2-D step functions between two neighboring blocks. Presence of the blocking artifacts is detected by using block activity based on human visual system (HVS) and block statistics. The boundary regions between blocks are identified as either smooth or non-smooth regions. The blocking artifacts in smooth regions are removed by modifying a few DCT coefficients appropriately, whilst an edge-preserving smoothing filter is applied to the non-smooth regions, i.e., genuine edges. The algorithm has been applied to variety of JPEG compressed images and results are compared with other postprocessing algorithms. The reduction in the blocking artifacts for each image have been evaluated using three indices, namely peak signal-to-noise ratio (PSNR), mean structure similarity (MSSIM) index based on human visual perception, and a new index, called here block boundary measure (BBM), applied to both vertical and horizontal block boundaries. The results show that the proposed method is very effective in detecting and reducing the blocking artifacts in JPEG compressed images.