McKEE, Ky. (AP) _ A heavily armed teen-ager apparently acting out author Stephen King's thriller ''Rage'' took 11 classmates hostage during a daylong standoff that ended with his surrender after nine hours, authorities said.

No injuries were reported.

Dustin Pierce, a 17-year-old, straight-A student, was detained by police Monday evening after he released his last two hostages, laid down three guns and surrendered.

Charges were not immediately filed.

A copy of ''Rage'' and some personal writings found in Pierce's room at his grandparent's house were helpful in giving negotiators clues to what he planned, said state police Detective Bob Stephens, who negotiated with Pierce.

Stephens said he had been worried by parts of Pierce's writing that indicated ''suicide was what we'd have to deal with at the end.''

In King's novel, a teen-ager enraged at his father takes hostages at a school, is shot and wounded by police and ends up in an institution.

Like the character in the book, Pierce was upset with his father, whom he had not seen for 13 years, and asked to see him, authorities said.

Police arranged to have the father, whose name was not released, brought from Delray Beach, Fla., but Pierce surrendered before his arrival.

The trouble appears to have begun Sunday evening when Pierce's friend Brian Bond picked him up at his grandparents' house so the two could study together, said Paul Bond, Brian's uncle.

When it became late and they had not returned, authorities were called and began searching for Bond's red pickup truck.

The standoff began around 9:30 a.m. Monday, when Pierce and Bond roared into the high school parking lot aboard the truck.

Authorities said that at some point during the disappearance Pierce pointed a gun at Bond, in effect abducting him.

Bond, the son of high school principal Betty Bond, was the first hostage released.

Craig Eversole, a 16-year-old junior, was in the classroom when Pierce entered.

''He shot the ceiling and told the teacher to leave and let two rows of students leave,'' Eversole said. Later, Pierce fired his only other shot, blowing out a classroom window.

Throughout the day, Stephens traded food, cigarettes and soft drinks for hostages.

Stephens said Pierce was solicitous of his hostages, asking for cigarettes on their behalf and even releasing one who needed to go to the bathroom.

''He said he wasn't going to hurt nobody,'' Eversole said. ''He said he wasn't going to shoot nobody.''

After Pierce's arrival, the students he first released warned others and the classrooms were cleared.

Eversole said Pierce was armed with a .357-caliber Magnum revolver, a .44- caliber revolver and a .12 gauge shotgun that had been altered. ''It looked like one you'd see in a movie,'' Eversole said.

More than a dozen state police officers went to the school just south of McKee, a town of about 1,000 people some 65 miles southeast of Lexington.

Police were concerned about references in Pierce's writing to dying at 9 o'clock. ''He said it'll all end at 9,'' Stephens said. ''We didn't want that 9 o'clock hour.''

Pierce surrendered at 6:30 p.m.

Sharon Judd, who had gone to school with Pierce since fourth grade, called him a quiet, straight-A student who liked guns.

''Many of the school reports Pierce did dealt with war,'' she said.

After taking over the classroom, Pierce's only persistent demand was to talk to his father, Stephens said.

''He hasn't seen his father, my understanding, since he's 4 years old,'' Stephens said. Pierce had lived with his grandparents for several years.

Near the end of the standoff, police called on a cousin and close friend of Pierce's to convince him no harm would come to him.

Chad Madden, an 18-year-old freshman at nearby Eastern Kentucky University, said he and his cousin talked about hunting.

''I just talked like I always do,'' Madden said. ''He was calm, pretty smooth. He started to cry a little bit when I was talking.''

At that point, tired and tense, Pierce was looking for a way to end the standoff, Stephens said.

''He wanted to know how many crimes he committed,'' Stephens said.