To boost the popularity of the young new Caliph among the population, and strengthen their own positions, they abolished the unpopular oil tax. While the alliance between Ibn Abi ʿĀmir and al-Mushafi had undermined the traditional power of the court slaves, relations between the two soon deteriorated. The Chamberlain's failure to address the loss of prestige due to the succession intrigue and Christian incursions that in 976 almost reached the capital allowed Ibn Abi ʿĀmir to gain control of army troops in the capital of the Caliphate after assuring Subh of his ability to restore that military prestige. Ibn Abi ʿĀmir, unlike the chamberlain, was inclined towards the military response to Christian incursions and was willing to command a retaliatory strike. Al-Mushafi, however, had advocated a defensive strategy, that despite the Cordoban military power had given to the Christian states the territories north of the Guadiana. At the same time, and also thanks also to the influence of Subh, Ghalib obtained the government of the Lower March and command of the border armies. In February 977, Ibn Abi ʿĀmir left the capital for his first campaigning season in Salamanca, following the strategy of containment of the Christian states maintained during the previous reign. His appointment as warden - head of an army - of the capital's troops drew him into alliance with Ghalib - the warden of the border armies - and brought about the end of the triumvirate that the two had formed with al-Mushafi. In his first campaign, lasting nearly two months, he plundered the outskirts of the baths at Baños de Ledesma. and brought two thousand captured prisoners to Cordoba, but failed to take any fortresses. In autumn, he attacked Salamanca. The new military prestige of Ibn Abi ʿĀmir won thanks to its ability to repulse Christian forces and attack Cuéllar during a second 977 campaign, and Salamanca in the autumn of the same year, again not with the goal of conquest but of weakening of the enemy and gaining of domestic popularity, allowed him to apply for the post of prefect of Córdoba, a role until then filled by a son of al-Mushafi. The new military reputation of Ibn Abi ʿĀmir, with the support of the harem and of Ghalib, allowed him to obtain the position without the chamberlain's consent.