BROOKSVILLE — Joseph Brannen stared at the pages as his attorney explained the deal that would send the teenager to prison.One day last summer, Brannen showed up at the East Hernando Branch Library clad in firefighting gear as crews worked to douse a blaze that Brannen would later confess to having ignited. On Friday, the mentally ill 18-year-old wore an orange jail jumpsuit that swallowed his thin frame; he bounced his legs up and down as he awaited his turn in a Hernando County courtroom.When the time came, Circuit Judge Stephen E. Toner Jr. asked whether Brannen wanted him to accept the plea deal struck with prosecutors. The terms: eight years in prison and an order to pay roughly $590,000 to Travelers Insurance and $25,000 to Hernando County. If convicted at trial, Brannen could have faced up to 15 years."Yes, sir," Brannen replied.Assistant Public Defender David Bauer told Toner that the deal had come after extensive negotiations with the State Attorney's Office. Bauer said Brannen has an "extremely significant mental health history and difficulties," but a psychologist deemed him sane at the time of the offense and competent to stand trial. Bauer did not elaborate on Brannen's illness but said the teen is taking prescribed psychotropic medications. "Do you feel you're competent to proceed here?" Toner asked."A little bit, yes, sir," Brannen replied."Do you understand what's going on?""Yes, sir."Brannen had just one prior arrest as a juvenile, for petty theft. Toner noted that the sentence fell within recommended guidelines and granted Bauer's request to recommend that Brannen be placed in a state Department of Corrections mental health treatment facility. He wished the teen luck, and Brannen thanked the judge.The call on the fire came during the early hours of July 6. When firefighters arrived at the library at 6457 Windmere Road in Ridge Manor West, they found wicker chairs piled against the back door on fire. The fire activated sprinklers inside the building.They also found Brannen in the area, wearing the bunker gear of a firefighter. When questioned by deputies about his presence, Brannen said he wanted to be a firefighter so he had purchased the gear on eBay.He told them he had heard the fire call over his scanner, so he had come to the scene, which was just down the street from where he was staying with his aunt. Brannen did not participate in helping to extinguish the fire.When investigators from the state Fire Marshal's Office and the Hernando County Sheriff's Office interviewed Brannen, he provided details of how he had gotten into the screened reading room at the library and set the fire.At the time of his arrest, Brannen claimed on his Facebook page that he was employed by Hillsborough County Fire Rescue. Brannen told authorities that he wanted to get a job there but didn't actually work there. The page said he attended Hernando High School and lives in Riverview.The fire caused extensive smoke and water damage from the sprinklers. The county had to hire a company to meticulously clean and pack every book. County officials say the repairs could be completed and the library reopened by August.The county opened a temporary library site this week at Ridge Manor Community Center at 34240 Cortez Blvd. An official grand opening is set for Monday evening.Tony Marrero can be reached at [email protected] or (352) 848-1431. Follow @tmarrerotimes on Twitter.