Prime Minister Scott Morrison has apologised for his government’s controversial and unlawful robo-debt scheme.

“I would apologise for any hurt or harm in the way that the government has dealt with that issue,” he told parliament on Thursday.

“Of course I would deeply regret – deeply regret – any hardship that has been caused to people in the conduct of that activity.”

The government is paying back $721 million to 373,000 people chased for debts through the unlawful program.

The scrapped scheme matched Australian Taxation Office and Centrelink data to claw back overpaid welfare payments.

It is now the subject of a class action challenge.

Mathias Cormann, the government’s leader in the Senate, backed Mr Morrison’s apology.

“That is appropriate for the prime minister to do,” he told the upper house.

Senator Cormann said the prime minister spoke for the government, but stopped short of apologising in response to three questions from Labor’s Senate leader Penny Wong.

“Of course it should not have happened in a way that was unlawful,” he said.