Taiwan is set to become the first country in Asia to ban the consumption of dog and cat meat, as increasing pet ownership across the continent has seen attitudes shift.

The revised Animal Protection Act imposes a fine of up to 250,000 Taiwan dollars (£6,500) for eating dog or cat meat, while the penalties for animal cruelty or slaughter were raised to up to two years in prison and fines of up to 2m Taiwan dollars (£52,000).

Repeat offenders can be jailed for up to five years and face stiffer fines, and those convicted under the new law may also be publicly shamed, with their names and photos published by the government.

The law also makes it illegal to “walk” a pet while riding a scooter or driving a car. The amendment still needs to be signed by the president, but could be law by the end of April.

Dog meat is not widely consumed in Asia, but it is featured in some regional cuisines, and cat meat is more rare. Dogs were once widely consumed in Taiwan, but are now almost universally seen as pets rather than food on the island.

Taiwan’s president, Tsai Ing-wen, is a well-known cat lover, frequently posing with her two cats during her campaign. She also adopted three retired guide dogs last year.

The most notorious mass slaughter of dogs for food occurs once a year in China during the Yulin dog meat festival. About 10,000 dogs are killed every year and eaten throughout the southern city of Yulin, but the festival has increasingly attracted the ire of animal rights activists.

Taiwan previously banned the sale of dog and cat meat in 2001, and some local governments had prohibitions on consumption.

A student convicted of killing two stray cats last year was sentenced to 10 months in prison. The case sparked national outrage toward the man, who was from Macau, and animal rights activists protested and attacked him outside the court.

Hong Kong banned the slaughter and sale of dog and cat meat while under British colonial rule, but did not specifically outlaw consumption.