VANCOUVER -- The man accused of stabbing an amateur photographer to death on the Stanley Park seawall almost three years ago has pleaded guilty.

The B.C. Prosecution Service confirmed that Tyler Lagimodiere pleaded guilty Thursday to second-degree murder in the killing of Lubomir Kunik.

A sentencing hearing is scheduled for early next year.

The 61-year-old victim, who also went by the name Lubo, was found stabbed to death on the seawall between Second and Third beaches on Feb. 1, 2017.

Police said Lagimodiere and Kunik didn't know each other before the apparently random attack. The victim is believed to have been photographing wildlife on the night he was killed.

Lagimodiere has a previous criminal record that includes convictions for resisting arrest, threatening police officers and gun-related charges.

Early last year, he made a bizarre court appearance via video conference, during which he went on a profanity-laced tirade while shirtless.

"F--- you, f--- your laws, f--- your system, f--- every last f---ing one of you," Lagimodiere said before offering an apology to his mother, who was in the courtroom.

Convictions for second-degree murder carry a mandatory sentence of life in prison, though parole can be granted after as little as 10 years.