A conservative rural politician and a former editor of a regional newspaper, Michael McCormack, replaced Barnaby Joyce as Australia’s deputy prime minister on Monday.

Joyce had announced his resignation on February 23 after his affair with a former adviser became public. The scandal led to a ban on sexual relations between government ministers and their staff.

McCormack, 53, was chosen by the Nationals – the junior partner in the governing Liberal-National coalition – to take over as the leader of the party in an internal vote, AFP reported. As the leader of the Nationals, McCormack automatically becomes deputy to Prime Minister Malcolm Turnbull who heads the Liberal Party.

“We are the party for small business and farmers and we want to make sure that continues and that can only continue with a close relationship with the Liberals,” McCormack told reporters in Canberra after winning the vote, AFP reported.

McCormack was a relatively unknown politician until now, but was criticised in 1993 for a column in which he described homosexuality as “sordid”. “Unfortunately gays are here and, if the disease their unnatural acts helped spread doesn’t wipe out humanity, they’re here to stay,” he had written, according to BBC.

McCormack has since apologised, and said his views have changed. He voted in support of Australia’s gay marriage law in 2017. He is seen as a safe choice to help the Nationals fix their ties with the Liberals after the Joyce scandal. Joyce, who has four daughters with his wife of 24 years, had an affair with a former staffer with whom he is now expecting a child.