WASHINGTON — “In my line of work, perhaps in your line of work as well, all we have is our reputation,” Marie L. Yovanovitch, the ousted American ambassador to Ukraine, said on Friday. “This has been a very painful period.”

It was just after 9 a.m. and the career diplomat and self-declared “private person” found herself engulfed in a ritual camera burst. She had entered the hearing room by a side door, as if she could avoid a fuss.

After a career of far-flung postings and a diplomat’s ease for sizing up exotic cultures, her mission before the House Intelligence Committee still resembled that of a wayward stopover in a strange land. Known as Masha, Ms. Yovanovitch, 61, looked every bit the outsider in a dangerous village.

She walked to her seat with a story to tell. She exited nearly seven hours later — after a presidential tweet denigrating her drew gasps from the audience — to applause.