MANHATTAN (PIX11) — While patrolling subway stations, two separate groups of NYPD officers were attacked within an hour Saturday afternoon, police said.

A man, 41, was standing too close to the edge of the platform in the Park Place station on the Nos. 2 and 3 lines around 4 p.m., police said. When two officers asked the man to back away from the edge, he became aggressive and kicked and punched the officers, according to the NYPD.

The officers placed the man in custody. They were then taken to the hospital for treatment of minor injuries, according to NYPD.

At the Canal Street station, police tried to stop a 23-year-old who entered the platform without paying around 4:55 p.m., per the NYPD. Police said the man turned around and punched the two officers in the face. The officers used a stun gun on the man and placed him under arrest.

The officers were taken to the hospital with minor injuries, police told PIX11.