She spoke for several hours about Mr. Labrie, but seemed to avoid looking at the young man, who sat as still as a statue through much of the testimony. Often, he seemed to be looking at the table in front of him, holding a pen in his hand, as the jury of 11 men and three women listened.

The courtroom here in New Hampshire’s capital city was packed — standing room only — as Mr. Labrie’s family, the family of the girl, and others strained to hear the testimony. A loud fan inside the courtroom made it hard to hear the accuser; early on, court officials had to turn it off.

It was all a sign of the growing interest in the case against Mr. Labrie, a former star student who earned a scholarship to St. Paul’s and had been headed to Harvard until the young girl came forward with her accusations.

Mr. Labrie’s lawyers deny that he and the girl had sexual intercourse, and he is expected to take the stand in his own defense. On Tuesday, J. W. Carney Jr., Mr. Labrie’s lead defense lawyer, argued that their encounter was consensual and more innocent than the girl had portrayed.

Seeking to undermine her credibility — the linchpin for many cases involving accusations of rape — he has pointed to their cordiality before and after the encounter, noting that she had wanted it to remain a secret, and emphasized that the girl chose to accept his invitation to the “senior salute,” which he described as an old tradition that many young students joined with pride.

Still, the case has cast that tradition, and other student rites, under a harsh spotlight as it explores the culture of sex, gender and entitlement at St. Paul’s — which counts ambassadors, senators and prominent authors among its alumni.

Surrounding the details of the episode, prosecutors have said, is the social context for the crimes of which Mr. Labrie is accused: The senior salute, in which, they have suggested, some boys compete to have sexual encounters with as many people as possible. It is one of many rituals at the school that encourage hierarchy, according to alumni, and Mr. Labrie told the police he had been actively engaged in the tradition, trying to “score” and win.