A 30-year-old man has been sentenced to life in jail for the murder of Waterford woman Samantha Walsh in April 2017.
Daniel Whelan, of no fixed abode but originally from Thurles in Co Tipperary, had been on a drink and drugs binge in the days previously and said he had no memory of the killing.
He was due to go on trial at the Central Criminal Court this week but pleaded guilty on Tuesday.
Ms Walsh's body was found in an apartment at Thomas Court, Thomas Street in Waterford on 28 April 2017.
The 31-year-old was originally from Lisduggan in Waterford city and was the mother of four children.
She was found with head and neck injuries, having been beaten to death.
The court was told that the two met while in a drug and alcohol treatment centre in Limerick and both left the facility "clean".
However, Whelan told gardaí that when they met up again they began using alcohol.
They moved into a squat together and in the week before the murder gardaí had been called to the apartment twice and Whelan had been asked to leave.
He had been taking large amounts prescription drugs in the days leading up the killing and had also drank vodka that night.
On the night she was killed, Ms Walsh had attended an Alcoholics Anonymous meeting and Whelan had been at a Narcotics Anonymous meeting.
A row began during which Ms Walsh had phoned a friend of Whelan's and said he was going mad, was breaking up the place and was "killing her". The friend told her to get out of there. She was murdered around 50 minutes later.
We need your consent to load this rte-player contentWe use rte-player to manage extra content that can set cookies on your device and collect data about your activity. Please review their details and accept them to load the content.Manage Preferences
Whelan went to a neighbour's home the morning after the killing to smoke heroin and he told them Ms Walsh had gone away for a week to visit her children.
He smoked some of the heroin with his neighbour, before returning to his flat where Ms Walsh's body had lain since the early hours of the morning.
An ambulance was called by neighbours later that day after Whelan tried to overdose on heroin.
He was treated at the scene by paramedics and, when he regained consciousness, he told gardaí he had killed Ms Walsh by beating her with a hammer and told them her body was in the bedroom.
No murder weapon was ever found and in a note found at the flat he had made reference to using an ashtray to kill Ms Walsh.

While in prison he wrote a lengthy letter to Ms Whelan's father apologising for her death.
In the letter, he said his life had been marred by drug addiction and homelessness since he was a child.
He said he went from care home to homelessness and was "f***ed up on drugs most of my life".
He described the killing as an argument that went too far, but said he had no memory of the actual killing.
He also said: "I'm a monster and a life sentence is too good for me. I'm so sorry."
The court heard he had 73 previous convictions.
Defence counsel Michael Delaney told the court that while he was not making any excuse for his actions, Whelan again stressed that they were not the actions of a sober person.
He again apologised for the murder and said it was not pre-meditated.
In a victim impact statement, Ms Walsh's brother Raymond described her as an adoring mother to four children and a funny, smart and caring person who had sought help for her alcohol problem.
He said while her life was not always easy, she always had a smile on her face and was helpful and kind to everyone.
He said her children's world would never be the same again and they would have to face milestones without her. They had also lost their father seven months after their mother died.
The family would now help them "grieve their mother and process this devastating loss which we know will not be an easy task. They are each a testament to their mother's love", he said.
He said his parents were devastated by the loss as were her brothers and sisters.

Her mother Pauline, like all parents who want to protect their children no matter how old they are, felt she had not been there to protect her daughter and was heartbroken.
Mr Walsh held a picture of his sister up in court and spoke directly to Whelan for some of the victim impact statement.
He said not only had he taken her from her family he had also taken from the world "a girl who genuinely believed in caring, sharing and loving and never asked for anything in return".
Mr Walsh also said her family was proud that when she died she had no alcohol in her system, which was testament to the efforts she was making to get her children back.
"Samantha had the biggest heart and her memory will live on in the music she loved, in our hearts and especially in her children," he said.
Mr Justice Michael White sentenced Whelan to the mandatory life sentence and described Ms Walsh as a young woman in her prime who met her death in a horrific way at the hands of Whelan.
He offered his sympathy to her family and acknowledged that through his guilty plea, Whelan had spared them the further hurt and pain of a trial.