The initiative was presented by Barcelona’s Vet Association as part of a series of measures aimed at increasing animal protection in the city.
From next October, dog owners will need to obtain a "civic licence" before they can let their pooches walk around without a leash in the city's designated dog parks.
Approved by Barcelona’s city council on Wednesday, the ruling will also result in the creation of more specific dog zones in Barcelona, in addition to the 103 already existing ones.
An animal abuse registry will also be set up, keeping a record of dog owners who leave their pets tied up for more than two hours or in a car for over 20 minutes.
Offenders will face fines ranging from 100€ to 600€.
Spain has the highest rate of pet abandonment in Europe, a fact which the national parliament hopes to counter with a planned ban on the sale of cats and dogs in pet shops.
Under the proposed new rules only licensed breeders and shelters could sell or hand over pets to their new owners, with offenders facing fines of up to €30,000.