From December 1982 to 1987, he was Minister for Foreign Affairs. In this capacity he was heavily involved in the negotiations which resulted in the 1985 Anglo-Irish Agreement. He also became the first joint chairman of the Anglo-Irish Inter-Governmental Conference, established under the Agreement by the Irish and British governments. Following the Labour Party's withdrawal from the coalition government in 1987, Barry became Tánaiste, for a brief period. He was the first member of Fine Gael to hold the office of Tánaiste.