A 17-year-old Dunedin youth who allegedly published death threats against a 17-year-old Milton youth on Facebook has been charged with threatening to kill or do grievous bodily harm.

Constable Brian McKinney, of Milton, said a Dunedin youth studying at Toko Training made threats on Sunday over the social networking site that he was going to kill a fellow student yesterday.

He said the youth appeared to have taken offence at a comment posted on Facebook about him. He will appear in the Dunedin District Court on July 12.