A teenager accused of killing his father and opening fire outside his former high school was obsessed with school massacres and sent e-mail to the principal of Columbine High School in Colorado warning of his attack, authorities said Thursday.

"Dear Principal," the e-mail read. "In a few hours you will probably hear about a school shooting in North Carolina. I am responsible for it. I remember Columbine. It is time the world remembered it. I am sorry. Goodbye."

Alvaro Castillo sent the message Wednesday morning, shortly before two students were wounded by the gunfire in the Orange High School parking lot in Hillsborough, said Orange County Sheriff Lindy Pendergrass. One student was grazed by a bullet and another was injured by flying glass.

Castillo, 19, was quickly arrested, and police found two pipe bombs and two rifles in the van he was driving and four additional pipe bombs at his home, authorities said.

Columbine Principal Frank DeAngelis did not read the e-mail until after the attack, according to a statement Thursday by the Jefferson County, Colo., schools. DeAngelis called the district's security director, who called the Orange County Sheriff's Department.

"In a case like this, he didn't hesitate to pass it along to law enforcement," spokeswoman Lynn Setzer said.

Castillo mentioned the Columbine massacre as he arrived Thursday morning for an initial court appearance. When asked why he fixated on the 1999 attack, in which two students wearing trench coats killed 13 people before committing suicide, Castillo said he didn't know.

"He was obsessed with Columbine, the (Kip) Kinkel shooting in Oregon, the (Jonesboro) Arkansas high school shooting," the sheriff said.

Investigators found numerous diaries at Castillo's home in which he wrote about attacks, Pendergrass said. Castillo told deputies he had killed his father, Pendergrass said. Rafael Huezo Castillo was found shot to death in the family's home. It was unclear when the killing took place.

The Chapel Hill News, a twice-weekly newspaper, received a package Thursday with a videotape and a letter signed with Castillo's name in which several references were made to school shootings.

The letter was dated Aug. 29, the day before Castillo was arrested, and Castillo appears on the videotape, The News & Observer of Raleigh reported on its Web site. The two newspapers share a reporting staff.

The letter described a father who was verbally abusive and sometimes hit members of his family. The letter ends with, "I will die. I have wanted to die for years. I'm sorry."

Castillo was charged with murder and 10 other charges. Castillo was assigned a lawyer and ordered held without bond at Raleigh's Central Prison. He didn't speak during the brief hearing.

His mother, Victoria, declined to comment about the case Thursday after attending her son's court hearing.

North Carolina National Guard officials said Thursday Castillo entered the guard as a recruit in 2004 and completed basic combat training in August 2005. He was never deployed and was being processed out of the guard after being determined to be medically disqualified for military service, according to the statement.

The guard declined to comment on Castillo's medically disqualification, citing confidentiality laws.

But according to court records released Thursday, Castillo was involuntarily committed to a state psychiatric hospital in April after he told his family he was going to kill himself with a shotgun.

"He stated that he was not going to go back into the Army and was going to kill himself," an affidavit attached to the commitment order said. He was released eight days later, according to court records.

Tiffaney Utsman, a senior, was grazed on her right shoulder by a bullet.

"My feeling about Tiffaney is absolute relief that she really was not hurt at all," said her mother, Champe Revis.

Hillsborough is in the Raleigh-Durham area of north-central North Carolina.