Barnaby Joyce has seen his fair share of battles as Australia's deputy prime minister - but he's lost his latest fight amid a scandal over an affair.

He says he'll step down as leader of the Nationals, the junior government partner, on Monday.