The work focuses on reconstructing, by means of a scatter analysis method, the primary beam photon spectrum of a linear accelerator. This technique is based on irradiating the isocenter of a rectangular block made of methacrylate placed at 100 cm from the source and measuring scattered particles around the plastic at several specific positions with different scatter angles. The MCNP5 Monte Carlo code has been used to simulate the particle transport of monoenergetic beams and register the scatter measurement after contact with the attenuator. Measured ionization values are input necessary for calculating the spectrum as the sum of monoenergetic individual energy bins using the Schiff bremsstrahlung model. The measurements have been made in an Elekta Precise linac using a 6-MeV photon beam. Relative depth and profile dose curves calculated in a water phantom using the reconstructed spectrum agree with the experimentally measured dose data to within 5%.