Pet dogs will have a compulsory microchip containing their owners' details in a new law to be introduced by the Scottish Government.

From April next year, all dogs in Scotland are to have a chip with their owners' details registered and kept up to date in a database complying with certain conditions. The same rules will also be initiated in England and Wales.

Ahead of the new rules coming into force, Dogs Trust, the UK's largest dog welfare charity, is offering free microchipping to all unchipped dogs in Scotland at mobile drop-in events and at its two rehoming centres.

The new legislation will encourage "responsible ownership" from dog owners, according to Rural Affairs Secretary Richard Lochhead - the Scottish Government minister with lead responsibility for animal welfare.

Mr Lochhead said: "Now is the time many of us make New Year's resolutions - and I urge all dog owners to make it a priority to get their dog microchipped before the law changes and it becomes mandatory in April.

"Compulsory microchipping will help reduce the number of lost and abandoned dogs in Scotland - safeguarding animal welfare and promoting responsible ownership. As well as reuniting pets with their owners, it will allow authorities to directly identify dog owners and hold them accountable for their dogs' behaviour and welfare.

"Dogs Trust is offering free microchipping at its two rehoming centres in Scotland, as well as at selected veterinary practices until the middle of January, and until March at mobile drop-in events.

"My New Year message to all dog owners is to make 2016 the year of your dog and make the most of the free microchipping offers while they are available."

Susan Tonner, Dogs Trust West Calder Rehoming Centre manager, said: "We were delighted to welcome the Cabinet Secretary to West Calder to meet Stephanie, a six month old Shih Tzu puppy, who has been looking for a new home and will happily be joining her new family very soon. Sadly, Stephanie was not microchipped when she was found straying by the local authorities, so they were unable to find her owners.

"Dogs Trust is the UK's largest dog welfare charity, with our West Calder centre having rehomed 11,000 dogs since it opened its doors in 1994. Reducing Scotland's stray dog population of over 1,400 dogs is at the very heart of our ethos, which is why we have committed to ensuring dog owners have access to free microchipping at our two Scottish rehoming centres in Glasgow and West Calder, or at one of our many drop-in events across the country.

"We are pleased that from April microchipping will be compulsory in Scotland, but we continue to remind owners that no matter how responsible they are, there is a chance their dog could get lost like Stephanie. Microchipping is the most effective way to assist in a lost dog being returned to their owner, however, to enable this it is important that owners keep their database details up to date."