Police in Reading say they arrested Keenan McMaster on Thursday inside Reading High School, where he had been filling out paperwork over a school suspension.
Police say McMaster shot and killed 19-year-old Jason Rodriguez on November 24, two days before the younger man was to be married. Investigators say the men had been involved in a dispute, but did not release details.
Authorities say a witness picked McMaster out of a lineup.
Rodriguez's family tells the Reading Eagle newspaper that he was two classes away from graduating high school.
It was not immediately clear if McMaster had an attorney.
Information from: Reading Eagle