NEW YORK – A deputy mayor arrested on a domestic violence charge in July would have been fired if he hadn’t offered to resign days later, Mayor Michael Bloomberg said Sunday, but he said he didn’t divulge the reason for the official’s departure to spare his family.

“It became obvious that he couldn’t work for the city and I immediately made sure that he no longer did,” Bloomberg said in his first comments about Stephen Goldsmith. It was revealed Thursday that Goldsmith had left his position a few days after he was arrested July 30 in Washington, D.C.

A police report said he had shoved and grabbed his wife. Both later disputed the account; prosecutors are not pursuing charges.

Bloomberg offered no apology for his failure to fully explain to the public when questioned Sunday outside a Brooklyn church.

Last month, Bloomberg had said only that the deputy mayor for operations was “leaving to pursue private-sector opportunities.”

On Sunday, the mayor said that was “accurate,” but added that he didn’t divulge the real reason because he didn’t want to “bring more suffering” to the Goldsmith family.

The two men had met the day after the arrest, and Goldsmith offered his resignation, Bloomberg told reporters.

Had he not, “I would have terminated him,” Bloomberg said.