NEW YORK — Riding the subway can often be a pain, but certain stops can be downright dangerous. A handful of the city’s bustling transit hubs saw hundreds of crimes last year, a recent report shows.

The Auto Insurance Center used publicly available 2017 crime data to create a list of the city’s most crime-ridden subway stops and determine which offenses were most common within the transit system.

The area around Brooklyn’s Atlantic Avenue-Barclays Center stop on the 2, 3, 4 and 5 lines proved most dangerous, with 334 crimes reported within a 100-foot radius — but none reported within the station itself, according to the analysis.

The most crimes inside a single station occurred at 42nd Street-Port Authority Bus Terminal on the A, C and E lines, which is part of the busiest subway hub in the city. Some 275 crimes were reported in that stop, while another 55 happened in the area around it, according to the report.

Rounding out the top five most dangerous stations are Third Avenue-149th Street in The Bronx with 207 crimes; the Jay Street-MetroTech A/C/F stop in Downtown Brooklyn with 192; Harlem’s 125th Street 2/3 stop with 173; and East Harlem’s 110th Street 6 station with 154, the report says.

Grand larceny accounted for 13.6 percent of last year’s subway crimes, making it the most common offense in the system followed by criminal mischief with 12 percent and forgery with 11.2 percent, according to the report.

Crime has risen slightly in the transit system despite an overall downward trend across the city, NYPD figures show. The Police Department recorded 2,028 transit crimes through the end of October, a 0.6 percent increase from 2,015 in the same period last year.