HUNTINGTON BEACH (KTLA) -- A man convicted of stalking and threatening a Huntington Beach detective has been sentenced to prison, prosecutors said Friday.

Brian Dopler, 28, was sentenced to five years and four months in prison Friday.

Last June he was found guilty on one felony count each of stalking and attempted criminal threats against Det. Gary Kim.

The threats began in 2009 when he was on probation for a domestic violence case against his ex-girlfriend.

Det. Kim was investigating Dopler for alleged complaints of stalking women.

Between Jan. 8 and Feb. 10, 2010, Dopler left 14 messages with expletives on his phone, including one in which he threatened to kill officers on his case, prosecutors said.

Three protective orders were issued against Dopler and he was sentenced to 300 days in jail and three years probation.