Sayyiduna Ali (may Allah be pleased with him) said: Sayyiduna Umar bin al-Khattab (may Allah be pleased with him) consulted me about the sale of ummahat al-awlad (mothers of their masters' children). He and I both held that she is free, so Sayyiduna Umar (may Allah be pleased with him), and after him Sayyiduna Uthman (may Allah be pleased with him), ruled accordingly. When I became caliph, I held that they should be slaves. Muhammad bin Sirin (may Allah have mercy on him) asked Ubaydah (may Allah have mercy on him) about this: "Which of the two is dearer to you?" He said: "The opinion of Umar and Ali (may Allah be pleased with them both) together is dearer to me than the opinion of Ali (may Allah be pleased with him) (alone) when he came to disagree."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب المكاتب / 21766