It was like the school year itself -- tinged with grief.

For Ballou Senior High School's Class of 2004, Sunday's graduation ceremony culminated a tumultuous academic year. A mercury spill shut the Southeast Washington school for a month, several brawls led to suspensions and arrests, junior James Richardson was shot near the cafeteria and later died, a freshman was found in the back seat of a car with a fatal gunshot wound to the head, and the principal was put on administrative leave.

For 19-year-old John Thomas, the ceremony meant more than earning his diploma. It marked another milestone: surviving high school in an area where rivalries can get a teenager killed, like his childhood friend Richardson, and one mistake can land a person in prison, like his father. He had worked hard to make it to graduation day, but to safely navigate Ballou and its surroundings took more than good grades. It took a kind of street smarts that turns teenagers into something like chess players, carefully plotting virtually every move in a part of Washington where roughly 250 people have been killed in homicides since 2000, the year Thomas was a freshman.

When an angry classmate, his face bloodied, wrestled with security guards in a Ballou hallway one day and students bumped into each other to see what was happening, Thomas stepped into the library to finish his English project, quietly ignoring the commotion. He avoided trouble by sticking to the basketball court, focused on sharpening his game while walking past clusters of young men who hang out near his apartment building after school. He hadn't started high school that way: By the end of his sophomore year, Thomas had low to failing grades and some minor scrapes with the law. By graduation, though, he had become an honor roll student and star basketball player, and he had been selected "Most Improved" of the senior class.

"That's what it's about -- making choices," he said.

Thomas is typical of many of the 1,100 students at Ballou, Washington's second-biggest public high school. He is neither a book-loving scholar nor a flunking troublemaker. In an academic year touched by disruptions and violence but also happier moments of growing up in a neighborhood that makes it easy to be bad but hard to be good, he struggled for a foothold somewhere in the middle.

Tests of Strength

Lanky but muscular, with a thin goatee and a soft-spoken demeanor, Thomas started the first two weeks of the school year not at Ballou but at H.D. Woodson in Northeast Washington. He had spent three years at Ballou and thought that he was ready for a change. But his mother, Gwendolyn Stover, 44, persuaded him to return to Ballou and finish there. "In a way, I thought that I should have" gone to Woodson, he said. "But there probably was a reason that I went to Ballou -- make me stronger."

The first test came Oct. 2, exactly one month after school had begun. A student had stolen mercury from an unlocked chemistry lab and helped spread it through the building, forcing an evacuation of the school that lasted the rest of the month. The building and several students' homes, which were also found to be contaminated, were cleaned of traces of the poisonous liquid. Students had to bring the clothes they wore that day back to school for testing. Then they were sent to a nearby middle school and the old convention center for classes, which led to shorter school days, long rides on buses and complaints of a lack of textbooks and other supplies. "I didn't really learn much," Thomas said.

Then, after classes ended on the first day back at the cleaned building in early November, a gunman fired several shots at a passing car half a block from the school. Security guards yelled at students to get inside. Later, in a single week in mid-November, three separate fights at the school led to suspensions and arrests, including a brawl at lunchtime involving more than a dozen students that sent worried parents rushing to Ballou.

Thomas avoided trouble, avoided even getting close to any fights. "That's how innocent bystanders be getting hit," he explained. "Anything could happen."

Challenges at Every Turn

The area surrounding Ballou, a sprawling brick-and-glass building in the 3400 block of Fourth Street SE in Congress Heights, is often called the inner city, separated by the Anacostia River from the federal core of downtown Washington, far from the monuments and economic revitalization that thrives in other parts of the capital. Violence in the communities surrounding the school is not new. By the time the Class of 2000 received diplomas, seven classmates had been slain that school year.

Between Jan. 1 and June 7, more people were killed in the 7th Police District -- which includes Ballou -- than in any of the city's six other districts, according to preliminary crime statistics. There were 24 homicides during that period.

But violence is not the only problem facing Ballou students. Most are eligible for free or reduced lunches, a key indicator of poverty. And Ballou's 2003 SAT scores -- 348 verbal and 349 mathematics -- were far below the averages for the school system and the nation.

Mixed in with the predictable graffiti on the bleachers in the gym are simple tributes written in ink reading "R.I.P. Moe," "R.I.P. Tay." Asked how many people he's known who have been injured or killed by gunshots, Thomas couldn't say.

He said there were too many.

Living for Basketball

Rap music blared from loudspeakers in the gym one afternoon in late November, the day before Ballou was to play in the city's Thanksgiving Day high school football championship. Young men and women showed off their dance moves at center court, but there was not much pep at this rally. A few rowdy students heckled the homecoming king and queen candidates. "Boring!" someone shouted. Thomas sat in the bleachers, taking it all in but not joining the unruliness.

Thomas, a popular student in a quiet sort of way, earned the nickname "Flood" when he was about 14. He likes to tell people that it had something to do with his jump shot, and when he got a tattoo on his left arm shortly after turning 19, it was no surprise what it read.

Thomas's love of basketball borders on obsession, but one that he now trusts to keep him out of harm's way. He played after school throughout the year, in season and out. He played in amateur leagues on the weekends and charity games in the evenings. He didn't eat lunch one day at school so he could watch some classmates play a game in the gym. And when he was at home in his bedroom, surrounded by his trophies and framed posters, paintings and pictures of Michael Jordan and Allen Iverson, he played some games there, too, on a Sony PlayStation 2. In three years on the varsity team, from his sophomore to senior years, he scored 1,200 points and had 500 assists and 400 rebounds, according to a coach. "Once you love it, it's like forever," said Thomas, who dreams of playing in the NBA.

He wishes his father could see his moves on the court.

Since Thomas was about 5, his father has been in prison. Wayne Thomas, 46, has been serving a 25-year term for a drug and firearm conviction. His scheduled release date is in 2013. He calls and writes his son often from a minimum-security facility at the federal penitentiary in Lewisburg, Pa. "You make one mistake and you can be gone for 10, 20, even life," said Wayne Thomas, also a Ballou graduate, in an interview at the prison. "Hopefully, I'm paying the price for all his little buddies and him. . . . I can be an example for them not to go on this path."

It was a path Thomas had edged toward as a freshman and sophomore. He said he was more concerned with "hanging out" than with schoolwork. He said such a mind-set led to his arrest three times -- twice for driving without a license and once for being in a stolen car with some friends. He was almost suspended a few times for skipping school, but he said former principal Art Bridges gave him a chance to redeem himself.

Hanging out in the street in the evenings and rebelling at school is behavior fraught with peril in this area. Late one night a few years ago, he abruptly walked away from a group of friends when he got a bad feeling. They later told him what had happened after he left: They had crashed a car after a chase by police. "It was like a voice that came into my head," Thomas said of why he left them.

In July 2000, the summer before he started 9th grade, two young men he had grown up with -- Mylan Lucas, 17, and Hakim Williams, 19 -- were shot at point-blank range in the parking lot outside Thomas's apartment building, a beige-brick complex about a 10-minute walk from Ballou on Sixth Street SE.

At that time, "I just didn't know where to go, so I was just hanging out," Thomas said. "It wasn't hard. It wasn't no challenge. I was, like, afraid of challenges at first. I always wanted the easy way out. But I see now you ain't going to get nothing trying to get the easy way out. You got to work hard to get something."

But excelling at Ballou and resisting the pull of the streets required more than academic rigor. It required a friend.

Finding a Lifeline

It was a small audience, but Thomas, No. 3, didn't seem to notice. Several dozen people filled two sets of bleachers in the brightly lit Ballou gym to watch the Knights play basketball one evening in late January. The shyness Thomas conveyed in the school corridors disappeared on the court as the guard in the beige jersey with blue trim sprinted from one end of the court to the other, beating his chest after getting fouled on a layup.

In the bleachers cheering Thomas on was a man who had become like a father or big brother to him. Renaldo Gillis was Thomas's basketball coach at Ballou during his freshman, sophomore and junior years. They formed a friendship that Thomas credits with helping him stay out of trouble. Gillis graduated from Ballou in 1985 and grew up on the same block where Thomas lives. He now owns a real estate appraisal company. He has three daughters and often refers to Thomas as his son.

Gillis pushed Thomas. When Thomas handed Gillis one of his report cards freshman year, "he had, like, three F's and two D's. I was like, 'Man, this is terrible,' " said Gillis, 36. "I wouldn't let him settle for being just a 2.0 student, or getting B's, or some D's, some C's. Nah. I said, 'Man, you get straight A's.' "

Their relationship illustrated the loose-knit, non-familial bonds that can form between older and younger men in an area where male role models are often scarce. When Gillis saw Thomas in a car with some guys he didn't know one day, he checked out the situation and warned them not to get his "son" in trouble. Before the basketball seasons got underway sophomore and junior years, Gillis told Thomas and his players that he would buy new sneakers for anyone on the team who made the honor roll. Thomas got his shoes each year.

Freshman year, Thomas had an overall grade-point average of 0.80. Junior year, with Gillis's encouragement and Thomas's new focus on academics, he had a 3.75.

Gillis saw basketball as more than a sport in Thomas's life. It was a shield, an escape, an alternative. Thomas came to see it that way, too. "It keeps me away from a lot of stuff," said Thomas, who in addition to playing for Ballou this year joined an amateur-league team coached by Gillis. "It's somewhere you can go. It's just you and your ball. You can just be shooting. You can think about a lot of stuff. You can get a lot of stuff off your mind."

On Feb. 2, just a few days after Gillis went to Ballou to watch Thomas play, he was in his Fort Washington office when he heard something on television that hurried him out the door: A shooting, inside Ballou.

A Friend Suddenly Gone

Thomas didn't hear the shots. He was sitting in his second-period computer class that morning. The students were told to stay inside the classroom, and a classmate who had been talking on her cell phone to a friend said the name of one of the victims was on the news: James Richardson.

Thomas couldn't believe it. He had known Richardson since he was about 9. They played football together as children, and Thomas had spent many of his summer days playing basketball on the court outside Richardson's apartment. He had just seen Richardson leaning on a locker in the hallway a few minutes before the shooting. They had shaken hands.

By the time he left school a few hours later, Thomas had learned that Richardson, 17, was dead, shot, police said, by another student. Thomas walked along the chain-link fence outside the school, his mother and other family members by his side. He choked back tears, speechless. Police said Richardson's shooting stemmed from a long-running feud between students from Barry Farm Dwellings and Condon Terrace, two nearby public housing communities.

The next morning, school resumed, but Thomas had to force himself to be a student again. He had spent the night at Gillis's home in Accokeek, wanting to get away from the chaos for a day. In the morning, he and Gillis sat in Gillis's Cadillac Escalade before school started, talking about life in Southeast. Thomas wasn't in a rush to get out of the car. Gillis said that trouble can happen anywhere at any time, in school and out, to the good kids and the bad. "Bullets have no names," Gillis said.

That evening, Thomas's mother joined at least 1,000 parents, students and city leaders at a passionate, six-hour meeting at Ballou. "This is his last year at the school, and every day, I'm afraid he's not going to come home alive," said Stover, who dropped out of Ballou in the 11th grade but encouraged Thomas and his two brothers and two sisters to strive for more.

Thomas grieved for Richardson, but he said he didn't want people at school to see him crying. But as the funeral approached, he changed his mind, saying that "now it ain't even about that. It's how you feel. . . . Just keep holding it in, it just keeps building up."

At the funeral that Saturday at Paramount Baptist Church, Thomas handed Richardson's father the white No. 11 basketball jersey his son had worn when he was on the team. It had been signed by the school's male and female basketball players. "Luv U," Thomas had written at the top. He was wearing a Philadelphia 76ers cap backwards and a letterman-style jacket with a photo collage of Richardson on the back and the words "R.I.P. #8," Richardson's football jersey number.

A strong sense of community, of a community under siege, filled the small red-brick church not far from Ballou. A teacher near the front of the church wept with such emotion that his body shook; students filed slowly past him to pause at Richardson's open coffin, the only sounds soft gospel music and the wails of mourners. Thomas stood near the back of the shoulder-to-shoulder crowd to watch the service inside the church where he had been baptized. He hardly said a word. People kept coming up to him and falling into his arms, crying. A young man he knew had approached him outside and stared into his eyes. "Wake me up, son," he told Thomas, "I'm dreaming." Inside the church, in a stairwell off to the side, Thomas sat down and buried his head in his hands.

A Hidden Strength

Months later, Thomas wore a white suit with a white vest and a white tie and white shiny shoes. He was driving a Mercedes S430, a sleek, silver head-turner with sparkling rims, that a friend of his uncle's let him borrow. By the time he stepped into Martin's Crosswinds in Greenbelt with his date, Janae West, a Ballou junior, and two friends by his side, he was all smiles.

It was a prom night in May not unlike others in the Washington region. Thomas and dozens of other students ate lemon chicken and jumbo strawberries on toothpicks and danced beneath a giant, low-hanging chandelier in a balloon-filled ballroom. It had been a year of jarring experiences, from the mundane to the tragic. By this point, he and other classmates felt that they were not so much students as survivors.

Thomas had been accepted to Delaware State University, and earlier that month a Ballou algebra teacher drove him to the campus in Dover so he could check it out. On the drive back to Washington, past the white clapboard churches, volunteer firehouses and wide-open farmland, the teacher, Mychael Brown, and Thomas talked about possible careers, the future.

"He put himself in a good position," Brown said. "He did that. Because he could have been the same type of student he started out to be. But he's not that anymore. So now he has opportunities."

Thomas felt stronger, tougher, by May. He had put pictures of Richardson wearing his football jersey up on the wall of his bedroom to remember "J-Rock," as students called him. Two other students had died since Richardson's slaying. Sherrod J. Miller, 15, a sophomore, was found unconscious on the floor of his apartment March 19, the cause of death still undetermined. Timothy Hamilton, 15, a freshman, was fatally shot in late April, his body found in the back seat of a friend's Toyota Camry.

"It's hard," Thomas said of the school year. "But if it don't kill me, it'll only make me stronger."

A Debt to Be Repaid

A few weeks later, amid the crowd of jubilant students in blue and gold caps and gowns outside an auditorium at Howard University, a teacher with a video camera was recording interviews with the new graduates. He elbowed his way toward Thomas, one of nearly 170 seniors who were handed their diplomas.

The teacher asked him what his plans were after graduation.

"College," Thomas replied. "Delaware State."

When the teacher asked him what he was going to remember about his time at Ballou, Thomas shook his head slowly from side to side. It was a simple question, but the answer, like his adolescence itself, came with understatement. "Tough years I went through," Thomas responded.

The circle of family and friends who surrounded him -- his mother, siblings, grandparents, cousins -- clamored for his attention. Gillis was there, too, standing proudly by his side. He was planning to take Thomas to dinner at the Cheesecake Factory on Wisconsin Avenue in Northwest to celebrate. Gillis had told Thomas once that the only thing he wanted in return for all he had done for him was to keep a tradition alive.

"I told him the only thing you owe me is, when you graduate from college, you come back to the 'hood and you grab somebody and bring them up, same as I grabbed you," Gillis said. "Then your debt would be repaid."

It was a promise Thomas says he will keep.