A patient receives repeated booster injections of a protein vaccine. Several hours after one injection, a painful area of redness and swelling develops at the injection site. Examination shows deposition of antigen–antibody complexes in local blood vessels with complement activation. Which category of hypersensitivity best explains this reaction?