An East Moriches man tearfully told a Suffolk judge Thursday he wished he was the one who died during a December 2013 home invasion burglary in Eastport, instead of one of the men he and a partner were trying to rob.

Matthew Rooney, 24, was then sentenced to 17 years in prison for first-degree manslaughter. He pleaded guilty in November. His partner, Paul Batterson Jr. — who fired a shotgun into Francisco Pirir Canel’s face, killing him — is expected to get a 35-year sentence next week.

“That night was not good,” Rooney said, before state Supreme Court Justice Richard Ambro sentenced him. “I wish he [Batterson] shot me. I’m sorry. I’d do anything to get him [Pirir] back. I’d do anything to do that night over.”

He turned to Pirir’s family and told them, “I’m sorry. I’m sorry.”

Earlier, Pirir’s younger brother, Marcos Pirir, told Ambro he almost felt sorry for Rooney.

“I want to forgive him, but he has to do his sentence,” Pirir said in Spanish through an interpreter. “My brother and I didn’t come here [from Guatemala] to do any kind of mischief. We just wanted to support our family, because we are poor.”

advertisement | advertise on newsday

Assistant District Attorney Kathleen Kearon said there were seven men in the house when Rooney and Batterson arrived, wearing masks, and shot out the windows and shot the door off its hinges. When Francisco Pirir, 45, said he had no money and would call police, Kearon said Batterson blasted him in the face with a shotgun, killing him instantly.

Kearon acknowledged that Rooney helped investigators after his arrest, but she said that until Thursday he had shown little remorse. She recommended a sentence of 20 years.

Defense attorney Pietrina Reda of Merrick said Rooney may not have expressed his sense of sorrow to authorities, “but he has expressed it to me repeatedly. He feels terrible about what happened.”

She pointed out that her client did not fire the shotgun and said he could be a productive member of society if he’s returned to it sooner.

“Nobody thinks you intended to kill anyone,” Ambro told Rooney. “But you went to that house, knowing your partner had a gun. When you’re part of a violent crime, things like that can happen.”

Ambro urged Rooney to continue getting substance-abuse treatment. “You are going to be a young man when you get out,” Ambro said.

As Rooney was led from the courtroom, he called out one more time, “I’m sorry.”