Courtney Senini knew something was amiss when aides started dashing in and out of the classroom, passing messages to the admirals and generals who taught her leadership seminar at the U.S. Naval Academy.

Finally, one of the aides stood before the room of seniors and in a big, puffy voice, said the words that would change their lives: "Ladies and gentlemen, the United States is under attack."

The room fell silent.

An attack on American soil seemed inconceivable when Senini and her classmates entered the academy in 1998. It was a time of relative peace and prosperity, and U.S. pre-eminence felt unassailable, almost permanent. Many of the midshipmen expected to "five-and-dive," meaning they would serve the required five years in the Navy and then use the prestige of their academy degrees to land lucrative jobs on Wall Street or at major corporations.

But on that morning of Sept. 11, 2001, as airplanes felled skyscrapers in New York and others slammed into the Pentagon and crashed into a Pennsylvania field, the stakes changed for the Class of 2002.

"If there's one day in my entire life that sticks out, that's it," Senini says. "It shaped what I did in the military and who I wanted to be afterward. It was absolutely the pivotal thing that shaped us."

Maybe the realization didn't set in right away, but it didn't take long for the midshipmen to grasp that in eight months, they would graduate into a more dangerous, uncertain world.

"There was a lot of emotion," Senini recalls 10 years later. "I compare it to Pearl Harbor, but this wasn't an island in the Pacific; it was our nation's capital and New York. It was painful and daunting and frightening to all of us. But at the same time, we were fricking excited to be a small part of going up against the people who attacked us."

In the years since, Senini and her classmates have fought wars in Iraq and Afghanistan. They have survived roadside bombs in Fallujah, briefed members of Congress on counterterrorism strategies and forged intimate bonds with Afghan civilians. They have seen inky night skies illuminated only by Tomahawk missiles and gorgeous green valleys where danger lurked behind every rock. Three have been killed in training and one in action. Another lost both of his legs in battle. Another won a Silver Star for valor in combat.

All of it began on that strange September morning when they learned that enemies wanted to kill them on their home ground.

Class President Josh Welle has collected essays from dozens of 2002 graduates describing where naval service took them. He hopes that, combined into a book, the essays will offer a glimpse of how a generation grappled with its sternest test.

"My generation didn't have a compass or a reference point," Welle says. "We had 'Top Gun.' But after 9/11, we found something, a purpose. It's this idea of the long war. We're not trying to be Tom Brokaw's greatest generation. But my classmates have sacrificed their youth, just trying to be this selfless generation that stands the watch during the long war."

The prospect of any war, much less a long one, was an abstraction for members of the Class of 2002 when they showed up in Annapolis as plebes. Many were like Travis Bode, the son of an oral surgeon who grew up in a posh section of Phoenix, Ariz. Weaned on "Top Gun" and "The Hunt for Red October," Bode saw the academy as a springboard to adventure and success.

"There was no war on the horizon," he remembers. "It was, 'Hey, this is a great school. You spend a couple of years doing something fun, you make great connections and then you go into business.' There was no thought to war at all."

Bode had a rare chance to sleep in on Sept. 11. He was on his way to the bathroom about 9:30 a.m. when he saw classmates in the lounge watching television as the World Trade Center collapsed. Within hours, Marines had set up a defensive perimeter around the academy, which seemed a potential target. A battle cruiser appeared offshore.

"It was like, 'Whoa, this is getting serious real quickly,'" Bode says. "It was a total mind shift."

Seth Lynn, a Marine from Westchester, N.Y., remembers sitting around a table with classmates that evening, saying, "Our lives have just profoundly changed. This is what we're going to be doing with our careers."

Welle recalls how locked-down the academy felt, with outside calisthenics canceled and guard watches doubled and tripled. Senior year was supposed to be a time to breathe out. The "firsties" could finally park their cars on campus and hit the town on weeknights. But any looseness vanished overnight.

Workouts became opportunities to harden the body for combat. Class sessions turned into practical discussions of how to respond proportionately to the attacks.