A police community support officer said an eight-year-old girl threatened to stab him "in the heart" when he was called to a school.
Officers were called to the school in the Harrogate District after the girl produced a kitchen knife in class.
North Yorkshire Police said the classroom was evacuated when the girl threatened officers and staff.
A force spokesperson added no-one was injured and the girl was "now receiving appropriate support."
PCSO Matt Murphy, who was called to the school last month, tweeted an image of the weapon, which he said had a 5in (12cm) long blade.
A week of action to tackle knife crime was launched by @NYorksPolice— PCSO 3573 (@PCSO3573) March 13, 2019
Only last week a 8 year old took this knife into school and made threats. When I arrived the child told me they would stab me in the heart. So this week we are educating people around the dangers of knives👮🏼♀️ pic.twitter.com/9bVaUvbGcE
North Yorkshire Police is currently taking part in a week-long national campaign to tackle knife crime.
Officers are carrying out high visibility patrols and publicising anti-knife messages in schools and on social media.
In his Spring Statement on Wednesday, Chancellor Phillip Hammond announced an extra £100m of funding for the police to help them tackle a knife crime "epidemic" in England and Wales.