The Huntington Beach City Council voted Monday to prohibit the sale of dogs and cats unless they're obtained from shelters, a humane society or a rescue organization, a move that seemed to please all parties involved.

The council voted 4 to 3 in favor of the ordinance, which is expected to allow the only two pet stores in the city to phase out selling pets that are believed to come from puppy mills.

The council was initially scheduled last month to put into law an ordinance that would have banned the sales of dogs and cats altogether, but a compromise was reached after Councilman Joe Shaw suggested city officials work with animal rights groups and pet store owners to come up with a reasonable solution, one that protects animals and businesses.

Monday's vote was welcomed by many in the audience who clapped and cheered for the council.

For some, however, the city's move was not reasonable enough. Of the handful of residents who spoke before the council, there were some who accused the city of letting "left-wing extremists" get their way and drive businesses out. Some of the commentators even referred to those animal rights groups as terrorists.

For Councilman Matthew Harper, who opposed the ban along with Mayor Don Hansen and Councilman Devin Dwyer, it was about adhering to the city's commitment to small businesses, especially at a time when Huntington Beach is looking for more revenues.

"If this passes, many residents and business owners are going to be asking what's next," Harper said. "What's the next job-killer ban of the month proposal that we're looking at?"

But Councilwoman Connie Boardman said she can do without revenues from the sale of puppy mill dogs and cats that are subject to inhumane and harsh treatments.

"You know, as concerned as I'm about city revenues, I don't want sales tax revenue generated from the misery of puppy mill dogs," she said, generating loud applause and cheers from the audience.

Councilman Joe Carchio initially brought the idea forward when he asked his colleagues in March to support banning the sale or resale of dogs and cats to keep up with its reputation of being animal friendly. The city has a dog beach and dog parks.

More than 15,000 dogs and cats were put to sleep in Orange County last year. Other cities, including Irvine, have put similar laws into place.

mona.shadia@latimes.com

Twitter: @MonaShadia