Every dog has his day, but one Brazilian dog will have the equivalent of parental visiting days after a court ruled that a separated couple must share their pooch.

The Sao Paulo couple got their Yorkshire terrier in 2008, but the dog became a bone of contention when they split up in 2011.

The woman not only held on to the animal but, according to her former partner, "prevented him from entering into contact," the Superior Justice Tribunal said in a statement from the capital Brasilia.

Taking his former companion to court, initially in Sao Paulo and then all the way to the Superior Justice Tribunal appeals court, the man claimed "intense anguish" over the separation.

The tribunal ruled this week to uphold the Sao Paulo court's earlier decision in favour of the dog-loving man.

He will now be entitled to visit the dog "at times such as weekends, holidays and end-of-year celebrations", the tribunal said.

"He may also participate in activities such as taking the animal to the vet."