Former deputy prime minister Barnaby Joyce has used the example of his baby son to attack a push to decriminalise abortion in NSW.

Independent MP Alex Greenwich on Thursday presented a bill to the NSW state parliament allowing for terminations up to 22 weeks and later, if two doctors “consider that, in all the circumstances, the termination should be performed”.

Mr Greenwich said the bill was 119 years overdue, with women and doctors operating under an “out of date law”.

Mr Joyce said NSW MPs should seriously consider the rights of the unborn.

“On the first of June, Vikki’s and my son Tom took his first breath,” Mr Joyce told federal parliament.

“This was not the start of his life. The reality is he was part of this world for some time and was merely passing from one room to another.”

He said Tom had rights long before he was born – even though he was not conscious of them – and those rights should not be removed by a state parliament.

31 July: Hundreds rally in support of NSW bill to decriminalise abortion

“Inside the womb, Tom kicked, punched, grabbed his umbilical cord, felt pain, slept and dreamed – to say he didn’t have the rights of other human life is to say he must be sub-human,” Mr Joyce said.

“I don’t believe that any person, any doctor, any parliament has the power today to declassify another person as less than human and by so doing removing their most fundamental right to be alive.

“In the NSW parliament they are debating whether Tom had no classification or human rights.”