The House and Senate gave final approval to the so-called PAWS bill -- short for Protecting Animal Welfare and Safety -- during the legislature's informal session.
The bill would raise the maximum prison time from five to seven years for a first offense and up to 10 years for subsequent offenses.
It would also increase the possible fine for committing animal abuse from $2,500 to $5,000 for a first offense, and up to $10,000 for subsequent offenses.
The bill now heads to Gov. Deval Patrick's desk.
The bill's sponsor, Gloucester Republican Sen. Bruce Tarr, has cited the case of "Puppy Doe," a dog that was euthanized after being found allegedly beaten and tortured in Quincy last year.