WASHINGTON (AP) _ A serious-looking Monica Lewinsky, whose testimony could define the future course of the Clinton administration, strode into a federal courthouse today for her long-awaited appearance before a federal grand jury. She was ready to testify that she had sexual encounters with the president inside the White House, sources said.

The 25-year-old former intern, wearing a dark blue suit and white shoes, was whisked into a side entrance of the courthouse, avoiding a crowd of more than a hundred journalists that had gathered overnight for today's dramatic appearance. Ms. Lewinsky, seeming glum, hugged a female companion as she stepped out of a car at the courthouse, then quickly moved inside accompanied by members of her legal team.

Sources familiar with the intense preparation Ms. Lewinsky has undergone said it was difficult for her to relive intimate details of her relationship with President Clinton, but she was ready to testify truthfully and anxious to finish the painful ordeal. The sources would not be identified by name.

One source described how Ms. Lewinsky cried during her preparation sessions with prosecutors working for Independent Counsel Kenneth Starr.

Ms. Lewinsky, 25, found it painful to discuss sexual subjects that normally would be private, the source added. And she viewed herself as someone whose fate was determined by her former friend Linda Tripp, who triggered the investigation by giving prosecutors 20 hours of recordings of her conversations with Ms. Lewinsky.

Clinton has denied an affair _ in testimony he gave in the Paula Jones civil suit against him and in a televised statement. The president will testify Aug. 17 by closed-circuit television.

Anticipation of Ms. Lewinsky's appearance was so intense Wednesday that courthouse security officials, media executives, attorneys representing news organizations and even chief U.S. District Judge Norma Holloway Johnson held a series of discussions on maintaining decorum in the well-guarded courthouse.

Ms. Lewinsky was granted blanket immunity from prosecution by Starr in return for her truthful testimony. Sources familiar with the deal said prosecutors hoped to keep her testimony shorter than the eight days that Mrs. Tripp spent before the grand jury.

Ms. Lewinsky began working at the White House as an intern in mid-1995 and transferred to the Pentagon in the spring of 1996, where she befriended Mrs. Tripp. Ms. Lewinsky returned to the White House on more than three-dozen occasions for visits, mostly to the Oval Office.

Prosecutors are investigating whether Clinton committed perjury in Jones lawsuit and conspired with Ms. Lewinsky and others to cover up their relationship.

As for Clinton, ``His mood is great,'' White House spokesman Barry Toiv said Wednesday. ``Obviously he is spending some time on preparing for his testimony.''

Clinton's lawyers, meanwhile, worked on a new legal dispute over the testimony of White House attorney Lanny Breuer that revived the issues of executive privilege and attorney-client confidentiality in the Lewinsky matter.

Legal sources familiar with the dispute said Breuer declined to answer some questions before the grand jury Tuesday on grounds that the subjects would violate the president's right to confidential advice from advisers. The president has previously raised an executive privilege argument in court but then dropped it.

The sources said some of the questions involved discussions of strategy related to potential impeachment proceedings if Starr were to forward an impeachment report to the House.

The sources, speaking on condition of anonymity, said the White House believed earlier court rulings left open the possibility it could make fresh claims of attorney-client privilege and executive privilege in seeking to block the questioning of Breuer.

Lawyers for Starr and the White House met privately for a second consecutive day in Johnson's courtroom about the privilege claims.

Meanwhile, a Democratic activist from Indiana provided a new account about a video that emerged last week showing Clinton embracing Ms. Lewinsky at an October 1996 political event in Washington.

John Sullivan, an Indianapolis attorney, said he was standing nearby when Clinton and Ms. Lewinsky hugged. Sullivan said the president asked Ms. Lewinsky, ``How are you?'' and ``How's your new position?''

At the time, Ms. Lewinsky had recently left her White House job for a new position at the Pentagon.

Sullivan said a friend who organized the event, Regan Burke, had pointed out Ms. Lewinsky to him earlier and asked that he keep watch over her because of worries Ms. Lewinsky ``might do something silly.'' Sullivan said he was told that Ms. Lewinsky was ``showing up at events and fantasizing about the president.''

``She said we want to make sure she doesn't kiss him or do something to embarrass the president,'' Sullivan said in an interview. Burke, an Education Department employee, was on vacation and could not be reached Wednesday.