Legal battle over dog ownership