Shuba reported, and I believe he traced it back to the Messenger of Allah ﷺ, who said, "The example of one who supports his clan in what is not right is like a camel that has fallen into a well and is being pulled out by its tail."
حدثنا محمد حدثنا شعبة عن سماك قال سمعت
شعبة وأحسبه قد رفعه إلى رسول الله ﷺ قال مثل الذي يعين عشيرته على غير الحق مثل البعير ردي في بئر فهو يمد بذنبه