The Wikipedia article on the Buyid dynasty is clear about the fact that the Buyids conquered the Abbasids and made them into a vassal state. So they did not "emerge as allies", but rather as ememies.
At the same time however, the Buyid did depend on the Abbasid to rule, particularly in Baghdad. Here is a relevant footnote from an article which spells that out more explicitly:
The Buyids probably never seriously considered abolishing the Abbasid caliphate. Like all the other Muslim rulers of this period, the Buyids relied on the caliph to confirm them in their new positions as rulers over their conquered territories. Especially the Buyids, condottieri of humble origins, were dependent on such forms of legitimation.
Another quote from a different source:
The Abbasid caliphs proved to be fierce defenders of their prerogatives in Baghdad even when representatives and troops from the Buyids and Saljuqs were able to control many of the city's functions. Almost without exception the various Buyid and Saljuq rulers were never able to establish concrete bases of support within Baghdad
The question makes a lot of the Ziyarids as well. My understanding is that there was a kind of three-way rivalry going on there. They were indeed vying for some of the same territories in the late 10th to early 11th centuries.