It was the final legislative hurdle for a bill the lower house passed in December.
The vote follows months of debate that pitted so-called zoophiles against animal rights and protection advocates. Sexual mores seemed not to play a paramount role.
The ban, which carries only a misdemeanour charge, is an amendment to the country's animal protection law, which, among other things, regulates animal testing and the sale of animals, and prohibits animal abuse, including ''using an animal for personal sexual activities or making them available to third parties for sexual activities and thereby forcing them to behave in ways that are inappropriate to their species''.
Zoophiles argue that their relationships with their pets, or ''partners'' as they prefer, are entirely mutual. Michael Kiok, a co-director of Zoophilic Engagement for Tolerance and Enlightenment (ZETA), said animals were perfectly capable of expressing whether or not they desired sex.
Animal-rights groups have criticised the move. But David Zimmermann, who is also a co-director of ZETA, said: ''It's a sexual aspect that is entirely foreign to most people. They just see a man and think, 'What terrible things is he doing to that dog?'''
''For me, she's just a good friend that I care about very, very much. There's no sex,'' he said.