Mayor Marion Barry has delivered a message of hope to hundreds of the District's young people before, but never in circumstances quite like yesterday, with both his federal drug trial and tenure in the city's highest elective office nearing an end.

Barry, appearing for the second time this week at the Youth Leadership Institute he founded during his first term, tempered a keynote speech about self-esteem and the possibilities of life with some fatherly and personal observations about human frailty.

"We're all going to make some mistakes," Barry said. "Whether you're a PhD or no D, you're going to make a series of mistakes. Whether you're the mayor or not the mayor, you're going to make a series of mistakes.

"God didn't create any perfect people," Barry added. "The problem is not making mistakes, it's how you deal with them once you make them. While you ask your God for forgiveness, you learn from it, but come back and hold your head high."

It was a sermonette that Barry has preached to a variety of audiences in the months since his arrest and treatment for substance abuse, but yesterday it took on poignancy as the mayor quieted a sometimes wildly enthusiastic audience with tough talk about hardships they may encounter as they mature.

"Believe me, you're going to face some difficulties," he said. "Life is not easy, is it? Life is very, very difficult. There are some dishonest people in this world. There are some cruel people in this world. There are some people who could do you harm in this world . . . .

"But don't worry about that," Barry added. "Worry about yourselves, feeling good about yourselves."

Barry's wife, Effi, who accompanied the mayor to the grounds of Catholic University yesterday during a break in his trial on 14 drug-related charges, urged the teenagers to follow his example.

"I hope that you will continue in his footsteps to build a better world for all," she said.

Barry seemed more relaxed yesterday than he did on his visit Monday, when he appeared to warm slowly to the institute environment.

For instance, he sat stiffly as he took in the lessons of an introduction to government class, and paid strict attention to a textbook as a teacher asked students whether they knew the difference between a right and a responsibility.

Between classes, reporters asked Barry what kind of role model he provided the youths. He responded curtly, "Ask them."

As the mayor's group broke for lunch, he elaborated on his feelings about role models.

"In most other communities, they don't talk about role models," he said.

"You don't see that in white communities . . . . Only in African American communities do they push this concept where you look outside of yourself for strength. That's how you get caught up in misguided directions."

Barry said his message to the students was to "look to themselves. Feel good about themselves. That's how you start. That's how I started."

At one point during a question-and-answer period about this fall's mayoral election, Barry said, "There are still some people who think I ought to run, but I am not going to do that."

Barry was escorted by the city's two youth mayors, Makini Street, 17, and Erika Harper, 18, both of whom spoke highly of the mayor.

"We're proud of him, we stand by him for his courage," said Street, who graduated from Wilson High School this year and will be attending Hampton University in the fall.

"He's still our mayor," Street said. "He's a very strong leader in the community. I think he's withstood very well what's happened in the media . . . . I think the media is responsible for how his situation has been magnified unnecessarily, but by no means am I saying it's the media's fault. I'm not blaming anybody."

"It was a rewarding experience," said Harper, who finished high school on the campus of Gallaudet College this year and will be staying on for the college course.

"It was a good time for the kids who look up to him to recognize how much he cares for us here."