A man who had argued at a baby shower was walking back toward the event in Waldorf with a rifle Saturday when he was arrested, the Charles County sheriff’s office said.

They said an argument broke out around 4 p.m. between two guests at the shower in the 2000 block of Nantucket Drive, and one of the guests was assaulted. The guest left the shower and got a gun from his car, the sheriff’s office said.

After authorities were called about a man with a gun near the shower, Rodrigueze Lavon Nowlin, Jr., 21, of North Carolina, was arrested, the sheriff’s office said. The sheriff’s office said that after the arrest they found an AR-15 with 27 rounds in it. An AR-15 is a semiautomatic assault rifle. Nowlin was charged with assault and reckless endangerment, the sheriff’s office said.