Jury selection began Wednesday in the trial of a former Southwood Middle student accused of killing another student in a school bathroom.Michael Hernandez, 18, is accused of stabbing Jaime Gough to death in 2004, when both boys were 14.

Before attorneys began questioning potential jurors, Miami-Dade Circuit Judge John Schlesinger issued a gag order in the case, prohibiting the attorneys and witnesses from speaking publicly about it.

The state attorney's office had requested the gag order after seeing Hernandez's attorney, Richard Rosenbaum, speaking to the media outside the courtroom on Tuesday.

Rosenbaum opposed the order, but Schlesinger said he thought it was the only way to protect Hernandez's right to a fair trial.

''The case needs to be tried in this courtroom, not in the newspaper or on television,'' the judge said.

The order was also opposed by attorneys for The Miami Herald, WFOR-CBS 4 and WTVJ-NBC 6.

Schlesinger refused a state request for an order sealing the names of the jurors and restricting the media from publishing their photos.

The judge agreed with media attorneys that the measure was not necessary.

Attorneys on both sides planned to question potential jurors as a group and individually about a variety of issues, including their schedules over the next few weeks because the trial is expected to last three or even four weeks.

They will also be asked if they have seen or read anything about the case, which drew national attention in 2004.

Potential jurors will also be asked about their views of insanity pleas and children who commit crimes.

Hernandez and his attorney do not dispute that he stabbed Jaime Gough. Rosenbaum is arguing that Michael was insane at the time of the killing.

If convicted of first-degree murder, Hernandez will spend the rest of his life in prison. If he is found not guilty by reason of insanity, he will be sent for treatment.