University of Maryland campus police used pepper spray early Saturday, May 22, to try to close down a loud party at a student apartment. Two arrests were made. (WUSA9)

Pepper spray was used early Saturday by University of Maryland campus police who were trying to close down a loud party at a student apartment, the police said. They said two arrests were made.

University President Wallace Loh, saying that he understood the “anger and frustration” apparently evoked, said he has asked for a “thorough review.”

In a statement, the campus police said they were called about a loud party and possible fight in one of the on-campus apartments on Boteler Lane in College Park.

Arriving officers were told of a fight and that “someone may have had a baseball bat,” the statement said.

After a decision to shut down the party, officers told partygoers to leave numerous times, but not everyone complied, the statement said.

More officers were summoned. At one point, an officer was surrounded by a crowd in a hallway and, according to the statement, “pepper spray was used.”

As firefighters arrived to treat those who had been sprayed, the spray was again used in a ­parking-lot confrontation, the police said.

The university’s Student Government Association described itself as “deeply concerned.”

In his Twitter feed, Loh said he met with campus Police Chief David Mitchell and “personally reviewed footage” apparently from officers’s body cameras.

The party was apparently connected to the end of the school year. Graduation ceremonies continued through Friday.