"I gave him five minutes to leave the house, but he didn't want to," murder suspect Diego G.R told the court on Wednesday, explaining the events leading up to the death of his brother.
"I told him I was going to call a locksmith to change the lock on the doors.
"Then I saw a shadow behind me," said the 38-year-old religion teacher.
"It was him (my brother) and he was going to attack me with a hammer," local daily Diario de Mallorca reported him as saying in court.
Diego G.R was originally detained on September 30th after he voluntarily turned up at a police station to confess, Spanish police said in a statement.
The suspect told police his 32-year-old brother Victor had moved in with him about a year ago, leading to heated quarrels.
On Wednesday in court, he outlined how — after one such argument — he had repeatedly struck his brother with a hammer until he was dead.
He said his brother had refused to leave "once and for all".
Diego G.R showed remorse as he described how he had lost his head and "finished off" his brother who "lay in agony" on the floor.
He went on to explain how he had then gone to a local shop to buy a freezer in which to place his brother's body.
When he realized his brother would not fit into the domestic appliance, he decided to chop him up and place the remains in plastic bags.
After his testimony which lasted more than an hour, Diego G.R was remanded in custody without bail, with the judge saying he was a flight risk.