The Maryland General Assembly on Thursday gave final approval to legislation that would slightly shift the legal liability toward pet owners whose animals bite a person and undo a controversial court decision that singled out pit bulls as an inherently dangerous breed.

The measure passed Thursday – which would apply regardless of breed – presumes that all dog owners should be held liable for a dog attack even if the owner had no reason to think the animal was dangerous. But the legal burden on pet owners could also be neutralized if the owner can prove that the animal had been docile except for the biting incident.

Pet owners and their advocates hailed the measure, saying the Maryland high court’s decision singling out pit bulls had unfairly stigmatized the animals. But critics — even those who supported breed-neutral legislation — said the bill’s presumption can be so easily countered that the measure would, in effect, mean that victims will once again have to prove that an animal had been vicious prior to the attack that injured them.

“We’re very pleased about passage about this bill,” said Chloe Waterman, state legislative affairs coordinator for the ASPCA. “Singling out a particular kind of breed punishes responsible dog owners but does nothing to further public safety. The General Assembly has consistently acknowledged that a dog’s breed doesn’t determine a dog’s behavior.”

The measure, sponsored by Sen. Brian E. Frosh (D-Montgomery), passed the House Thursday by a vote of 136 to 2. The Senate voted for the same bill 45 to 0 on Feb. 28 after amending it to make owners liable for injuries caused by a dog that’s running loose. A dog owner could also avoid liability if the victim was trespassing, committing a crime or provoked the attack by teasing or tormenting the animal.

Thursday’s vote caps nearly two years of wrangling in the legislature about who should be liable whenever a dog causes serious injury. The controversy arose following a 2012 Court of Appeals decision in Tracey v. Solesky.

The high court, deciding a case in which a pit bull inflicted life-threatening injuries on 10-year-old Dominic Solesky from Baltimore County, held that the owners of pit bulls and pit bull mixes should be liable for damages regardless of the circumstances of the attack because the breed is so dangerous. The court, reviewing medical and veterinary literature, said the breed had not only been bred for aggressive tendencies but its physical features often meant that attacks caused more serious injuries than those caused by other breeds. It also said landlords could be held liable too if they knew that the animals were on the premises. The court later modified its ruling to apply only to purebred pit bulls.

The legislation passed Thursday represented a compromise reached by Frosh and Del. Luiz R. S. Simmons (D-Montgomery). In the past, lawmwkers from the Senate and House had been unable to pass a bill, with the Senate preferring a measure placing more of the onus on all dog owners, while the House backed the notion that an owner should not be held responsible if he had no inkling the dog was dangerous.

Anthony Solesky, whose son was injured in the 2007 attack, said Thursday that he welcomed the language that presumes owners knew or should have known their dog would attack.

“The language in the bill certainly validates that everybody will be responsible for your dog,” Solesky said. But he also wondered whether the law will allow victims of pit bull attacks who go to court to rely on documented evidence suggesting the breed is more dangerous than others when they try to demonstrate that the owner should be liable.