An automatic analyzer is equipped with a sterilization mechanism removably attached to an opening of a container that holds a reagent and having an ultraviolet light generation section that radiates ultraviolet light; a suction nozzle removably attached, together with the sterilization mechanism, to the opening of the container; an analysis section adding the reagent drawn in by suction from the container via the suction nozzle to the reagent, and executing an analysis operation; and a control section exercising variable control over an irradiation light intensity of the ultraviolet light generated by the ultraviolet light generation section.