A "deconvolution" algorithm for the determination of the scatter contribution in positron emission tomography is described. The projected distributions of scattered radiation measured with a line source at different positions in water phantoms are described analytically. It is shown that an integral transformation of the observed projections with a slightly modified analytical function gives an adequate description of the scattered radiation. The scatter distribution from any composite object can thus be calculated and subsequently subtracted. The algorithm is tested on different objects. The result shows that the level of scattered radiation can be reduced from 25 to 1% of the total count rate in the center of the projection from a homogeneous phantom.