The resolution of electron-beam lithography is limited by the proximity effect, which is due to the scattering of incident electrons. This scattering leads to exposure of neighboring areas and, therefore, to pattern degradations. It can be modeled by convolving the incident dosage distribution with a point spread function and the subsequent developing process by a pointwise nonlinear function. This article presents an iterative algorithm that exploits this overall model to compute corrections of the proximity effect in the nanometer range. A convex error function is derived that satisfies all physical constraints and the problem is set up as a convex, constrained, and nonlinear minimization problem. The correction algorithm is a hybrid of the conjugate gradient and gradient projection algorithms. Its performance for a test pattern is evaluated and then a detailed analysis of the effect of inaccuracies of the model parameters and of the necessary quantization of the corrected incident dosage distribution is presented.