The woman testified that she had had consensual oral sex with Mr. Shakur at a nightclub four days earlier. But in the hotel room, she said, Mr. Shakur wanted to share her with his friends, who forced themselves on her. The defense said that she had made the accusations out of jealousy when she saw Mr. Shakur with another woman.

In her statement in State Supreme Court in Manhattan, the woman said that Mr. Shakur and the three friends "set upon me like animals." Since then she said she has received threatening phone calls, lives in constant fear, has suffered nightmares and, while Mr. Shakur "has been glorified by his peers and fans," she has been viewed as a villain.

Calling for a stiff sentence, she concluded, "He should not be allowed to use his so-called celebrity status to avoid the consequences of his actions."

As he entered and left the courtroom, Mr. Shakur smiled cheerfully at 35 or so supporters, among them several young women who wept on hearing the sentence. At one point, during a recess, one of the women leaned over the rail and kissed him on the cheek before a court officer ordered her back to her seat.

As the victim addressed the court, Mr. Shakur stared intensely at her. Then he got up and apologized to her. But he went on to say: "I'm not apologizing for a crime." He added, "I hope in time you'll come forth and tell the truth."

It was not clear what he was apologizing for. Later he apologized again, saying, "I got so involved in my career that I didn't see this coming, that I wasn't more focused." He also apologized to "the youth of America," but he did not elaborate.

"I have no shame," he said. "I don't feel shame."

But Justice Daniel P. Fitzgerald said, "This was an act of brutal violence against a helpless woman." He said that Mr. Shakur had been the "instigator" of an "arrogant abuse of the victim" which culminated an escalating display of arrogance as he pursued his career.