A New Bedford man has pleaded guilty to hacking into computer networks around the country.

25-year-old Cameron Lacroix was charged with two counts of computer intrusion and one count of access device fraud. He has also pleaded guilty to obtaining stolen credit, debit and payment card numbers, and has agreed to serve a four-year prison sentence.

Lacroix, a former student at Bristol Community College, hacked into networks including law enforcement agencies, a local police department, and BCC in order to access sensitive data and alter academic records.

According to the plea agreement, Lacroix's hacking activity took place between May of 2011 and May of 2013.

Lacroix faces sentencing on October 27.