A 31-year-old woman has gone on trial at the Central Criminal Court in Galway for the murder of a man in Salthill, Co Galway, in July 2011.
Maura Thornton, with addresses at Upper Salthill and Inverin, Bealadangan, Connemara, has pleaded not guilty to the murder of Kevin Joyce.
In his opening address to the jury of six men and six women, prosecution senior counsel Paul Greene said Ms Thornton had been a mature student and had previously been in a relationship with Mr Joyce.
The 59-year-old victim was a US national, but had been a resident in Galway for some time.
Mr Greene said both the accused and the victim had a background of alcohol dependency.
Ms Thornton was the sole occupant of an apartment at Upper Salthill, but she was visited by her mother, Breege Ridge Thornton, and her partner, Brendan Lydon, on the afternoon of 31 July 2011.
They had brought food to Ms Thornton because they were concerned about her well-being.
Mr Greene said that Ms Thornton was "quite intoxicated" when they arrived and they had been contacted by Mr Joyce on a number of occasions that day.
He said that Mr Joyce arrived at a rooftop area adjoining the apartment at around 10pm.
The court heard Ms Thornton was unhappy at his arrival and took a knife from the kitchen before going outside.
The prosecution said evidence from the Deputy State Pathologist will show Mr Joyce had been stabbed 17 times.
After hearing evidence from two garda witnesses, Mr Justice Barry White adjourned proceedings until tomorrow morning, when the two main witnesses will be called to give evidence.
The trial is expected to last until the end of next week.