A builder chased after his workmate and killed him by stabbing him at least 17 times in a "merciless attack", a court has heard.
Robert Goodwin, 32, is accused of murdering Shane Thompson, 32, with a kitchen knife at a house in Birmingham on 4 December 2021.
Thompson was discovered by his girlfriend in a pool of blood on her bed at her home in Roundlea Road, Bartley Green, Birmingham Crown Court heard.
Goodwin, from Washington Court, Birmingham, denies murder.
Thompson was stabbed to death at his girlfriend's house, the court heard. Goodwin is accused of stabbing him with a kitchen knife he took from the property.
Thompson's girlfriend was not there when he was stabbed, the court was told.
Prosecutor James Dawes KC said: "It was a merciless attack with at least 17 stab wounds. Shane and the defendant had spent the day together.
"They had both been working together as builders. After that, they went to the pub and had gone back to the house.
"Because Shane died before the alarm was raised and before paramedics and police attended the only person who can tell you why he did it is the defendant."
Dawes said there appeared to be "no background of animosity between the two men".
He said: "Shane must have felt comfortable in the company of the defendant to invite him back to his girlfriend's house. From the blood distribution within the house, it seems as though Shane ran away from the defendant as he was stabbed.
"The defendant pursued Shane up the stairs in this small house stabbing him to the back of his legs as he ascended the stars."
Dawes told the court that Mr Thompson fled into the bedroom where he made his "last stand before being stabbed to death".
Dawes said: "He collapsed on the bed and died in that position. The defendant left the knife at the scene and then fled."
He said Goodwin had tried to cover his tracks by stealing Thompson's BMW and driving away, then changing his clothes and driving to another area of Birmingham. The car was later found abandoned.
Dawes said that when Thompson's girlfriend returned home she found a mess downstairs.
"She went upstairs and found her boyfriend's body in a pool of blood on her bed," he said.
"One can only imagine how upsetting that must have been for her. The police were called and the ambulance called but it was too late."
The court heard that Thompson was a carpenter and plasterer by trade and met his girlfriend in 2018.
The trial continues.