On 12 October 1988, he was named first deputy minister in the federal government led by Ladislav Adamec.[3][4] Hrivnák was appointed Prime Minister of Slovakia on 22 June 1989, replacing Ivan Knotek in the post, but his tenure lasted very brief and on 8 December 1989, Hrivnák and his cabinet resigned.[5][6] The chairmanship of the Slovak National Council (SNR) accepted the resignation.[7] Then Milan Čič was asked to form a new cabinet.[5]
Hrivnák died on 3 February 1995 in Bratislava and was buried in the National Cemetery.[1]