Dr. Fatima Cody Stanford was on a Delta flight from Indianapolis to Boston on Tuesday when she noticed the woman next to her showing signs of distress. So Dr. Stanford did what she was trained to do in more than a decade of experience as a doctor — she began to assist her.

But Dr. Stanford, who is black, said she had just started to help the passenger when a flight attendant approached and asked if she was a doctor. Dr. Stanford said yes and, without being asked, she took out her medical license, which says she is a physician registered in Massachusetts and has the letters “M.D.” after her name.

“I know I don’t look the part,” Dr. Stanford, 39, said in an interview on Thursday. “So I just carry it with my driver’s license at all times.”

The flight attendant glanced at it and walked away, she said. As Dr. Stanford continued to try to calm the passenger, another flight attendant approached and asked to see the license. She, too, looked at it and walked away. Then the two flight attendants returned together and began another series of questions.