Barnaby Joyce has admitted he knew when his partner became pregnant in mid-2017 that he would lose his job as deputy prime minister. But he went on to fight a by-election without revealing his personal situation.

Mr Joyce and his former media adviser, Vikki Campion, revealed the timeline in a paid interview with Channel Seven.

Ms Campion told the program she had taken a pregnancy test in the winter of 2017.

“I’ll be frank. I don’t believe in abortion. I knew at that point that I was going to lose my job as deputy prime minister,” Mr Joyce said.

The former deputy PM contested a by-election triggered by his dual citizenship in December. After his re-election, he announced he had separated from his wife.

It was not until February of this year Mr Joyce stepped down as Nationals leader and deputy prime minister.

Ms Campion gave birth to his son Sebastian in April this year.