Flanagan rose rapidly through the party ranks, and was appointed a Parliamentary Secretary under Taoiseach Seán Lemass in 1959. In the Fianna Fáil leadership election in 1966 Flanagan supported Jack Lynch. When Lynch became Taoiseach, Flanagan was promoted to the Cabinet as Minister for Health. Three years later in 1969, he became Minister for Lands. Flanagan lost his seat at the 1977 general election, and effectively retired from domestic politics; however, he was elected to the European Parliament in the first direct elections in 1979. He was re-elected in 1984, and retired from politics in 1989.