LONDON (Reuters) - A Moroccan man who stabbed a passer-by to death on a British street in what he later told police was revenge for Israeli action in Gaza was jailed for at least 45 years on Friday, with the judge calling the murder an act of terrorism.

Ahmed Alid, 45, who had sought asylum in Britain, killed his 70-year-old victim after approaching him from behind on a road in Hartlepool, northeast England, in the early hours of Oct. 15 last year, having previously attacked his Muslim housemate who had converted to Christianity.

After his arrest, he told detectives he had committed the acts because of the conflict in Gaza and said he would have killed more people if he had been able to, prosecutors said.

He was found guilty last month of murder, attempted murder and assaulting two female detectives during his police interview.

"You attacked and murdered Terence Carney in a terrorist act," judge Bobbie Cheema-Grubb told Alid as she sentenced him to life in prison at Teesside Crown Court, saying he must serve a total of 45 years behind bars before he could be considered for release.

"You intended it as revenge for the actions of a foreign country, Israel, and to intimidate and influence the British government in its international relations."

Alid had first used two knives to attack his sleeping housemate, to whom he had become aggressive after learning of his conversion to Christianity, stabbing him six times while shouting "Allahu akbar", or "God is greatest".

The 32-year-old housemate, one of five asylum seekers who shared the property, managed to fight him off and another occupant came to his aid.

Alid left the house and walked down the road where he passed Carney on the opposite side of the street. He circled back and attacked him from behind, stabbing him six times in the chest, abdomen and back. Carney died shortly afterwards.

Following his interview with police, he attacked the two female detectives, with one suffering injuries to her shoulder and wrist.

(Reporting by Michael Holden; Editing by Nick Macfie)