A 16-year-old boy accused of sending school officials two emails in December that shut down eight schools in Windham and Raymond for three days wrote that he was “sick of being bullied” and planned to bring a gun to school to exact his revenge.

The emails written by Justin Woodbury were made public for the first time in court Thursday. At the hearing in the Cumberland County Courthouse in Portland, Woodbury was released from custody for the first time since his arrest on Dec. 17. He was allowed to return home with his parents in Windham after more than six months in a juvenile detention facility.

Prosecutors also revealed that police who searched Woodbury’s home found a handgun in his bedroom closet loaded with seven rounds of ammunition.

Assistant District Attorney Michelle McCulloch, who is prosecuting Woodbury, read the contents of the emails aloud to Judge Peter Darvin. McCulloch argued that the teenager should remain in the Long Creek Youth Development Center in South Portland because he has used his computer expertise for crime and cannot be appropriately monitored if he is released.

But the judge instead agreed to a set of restrictions recommended by Woodbury’s attorney, Ned Chester, that would have Woodbury live with his parents with no access to computers, phones or other electronic devices with Internet capability, and that he remain under the supervision of a juvenile case worker and undergo therapy.

Woodbury left the courthouse with his parents, John and Tina Woodbury, after the hearing, but the case against him has yet to be resolved. The judge ordered all sides to return to court on July 23 to assess Woodbury’s progress and schedule the case for trial.

The Woodburys declined to comment after leaving the courtroom.

Justin Woodbury is accused of sending emails on Dec. 14 to two school administrators, prompting officials to shut down all eight schools in Regional School Unit 14. The shutdown kept 3,300 students out of class for three days and unsettled children and parents in the two towns.

The subject line of the email to Windham Middle School Principal Charlie Haddock was “sick of being bullied,” according to McCulloch.

“I’m going to bring a gun and show how they make me feel. Dead,” McColloch said, reading that email.

The subject line of an email to Sandy Prince, superintendent of RSU 14, said “this is how it all ends.”

“I am done being bullied by all of the kids. … I will be in at 10 a.m. sharp to bring all of my pain back to them,” Woodbury wrote in that email, McCulloch said.

Woodbury concealed himself as the author initially by creating a dummy email account that used an online identity based in Czechoslovakia. When police traced that identity to him, Woodbury initially claimed he had been blackmailed but later told investigators that he did it “for a thrill,” McCulloch said.

“We have two separate emails with two threats being made with a significant impact on the entire community,” she said. “There is still a lot of fear, and it is still very fresh for a lot of people.”

Woodbury had attended Windham schools in the past, but left the district after completing middle school two years ago. He was a junior at the Baxter Academy for Technology and Science, a charter school in Portland, at the time of his arrest.

Chester argued that two psychologists examined Woodbury while he was at Long Creek and determined him to be a “low risk” to society, and that Woodbury had done very well at the juvenile facility.

“He’s at a different mindset than he was six months ago. Six months is a long time to be at Long Creek,” Chester said.

Chester said Woodbury’s parents know they must be extra vigilant in supervising him. He also recommended to the judge as conditions for Woodbury’s release that Woodbury be restricted from possessing firearms or other weapons, and that he submit to random searches.

The judge told Woodbury that he didn’t consider the email threats to be a “prank” and called the charges “terrorism.”

“For someone with no criminal history, if this is in fact your first time, you picked quite an audacious and spectacular beginning of a history of any juvenile case,” Darvin said. “Justin, I hope you understand you are being given an opportunity. … There is going to be a zero tolerance on violations of these conditions.”

Woodbury entered a plea in January denying two felony charges of terrorizing. A denial is the juvenile equivalent of a not guilty plea. If found responsible for the charges, he could be held at Long Creek until age 21.

Scott Dolan can be reached at 791-6304 or at:

[email protected]

Twitter: @scottddolan