Just a few months ago, Renaud Begin worried that Montreal, the city he lives in, was trying to take his dog away from him.

The dog, Stella, looks like a pit bull, and that made her subject to a 2016 bylaw restricting pit bull ownership in the city. Because of the regulation, Mr. Begin got a new permit, gave Stella a microchip and had to muzzle her when she was outside.

He said that he complied but nevertheless got a letter from the city in August notifying him that he was in danger of losing Stella if he did not file the proper paperwork. “I didn’t sleep well,” Mr. Begin said in a phone interview on Friday. “I almost didn’t eat for a few days because I was stressed.”

Now, Mr. Begin, a 20-year-old university student, can breathe more easily. The provisions of the bylaw targeting pit bulls were dropped this week.