CAIRO — Novelists work hard to acquire human experience. They search for characters who might inspire them. They go to unusual places to collect the necessary material for their novels.

I am lucky not to have had to undertake these adventures because I am both a novelist and a dentist.

The dentist’s profession enables him to see so many varied examples of humanity that his clinic sometimes resembles the backstage of a theater, where the performers, out of costume and minus makeup, are no longer acting.

I have treated the teeth of thousands of people, from the poorest peasant farmers to society ladies and government ministers, and I am always learning something new about human behavior.

A government minister in Egypt does not go to the dentist on his own. Instead, an entourage of sycophantic staffers sniffs all around the clinic like bloodhounds to make sure that everything is as it should be.

This tawdry drama epitomizes the philosophy of rule in dictatorial regimes, in which loyalty always comes ahead of efficiency as a condition for promotion.

I used to work as a dentist in a government institution. One day, as I was about to do a filling for a staffer, having placed a rubber dam over his mouth, the door opened and the director’s secretary came in to tell me that the big boss was on his way to the clinic to have his teeth looked at.

“The director doesn’t have an appointment,” I stated calmly.

“The director doesn’t need to have an appointment,” he said with incredulity. “Please get rid of this patient so that you can see the director.”

“I haven’t finished with this patient yet,” I told him angrily. “I don’t think you understand that the director is just a patient here.”

The secretary looked at me wide-eyed, then left, slamming the door behind him. I realized I was in for trouble, but I was not afraid. Nor was I sorry for having stood up for the principle.

During my exchange with the secretary, however, I had forgotten about the patient with the rubber dam over his mouth. He was gurgling and gesticulating as he tried to tell me something. The moment I removed the rubber dam, he leapt from the chair.

“Doctor, you’re wrong,” he shouted. “The director is entitled to be seen by you whenever he feels like it, and I am handing over my appointment with you to him.”

The patient did not wait for my response, but rushed out of the surgery, his cavity unfilled. He apologized to the director and led him into the surgery.

This was a lesson for me in just how difficult and usually abortive it was to defend the rights of people who have lived an eternity under oppression.

Another issue I increasingly encounter is that according to the Wahhabi interpretation of Islam, which is ever more influential in Egypt, women should cover their faces with the niqab and not have any dealings with men — even for medical treatment. However sick she may be, a woman must be seen by a female physician even if the latter is less experienced than her male colleague.

On one occasion, a woman in a niqab came to see me. She was accompanied by her bearded husband, who looked me and my staff over as if we were potential kidnappers.

I asked the patient to take a seat in the chair. Her husband, who insisted on standing next to her, suddenly said: “If you need my wife to remove her niqab, then you can stay — but the others have to leave the room right now.”

“Those in the room are not here to look at your wife’s face,” I replied. “They are dental assistants and they are indispensable.

“Furthermore, if your wife turns out to have an exposed nerve, she will be treated by our specialist, who is a Christian.”

I uttered this last phrase with a dramatic flourish and then stepped back. The man grabbed his wife as if to leave, but to our surprise, she refused.

They exchanged whispers, which turned to shouting, and we understood that the poor woman was distressed by the fact that her husband’s extremist views were preventing her getting treatment.

This made me realize that many women we’d considered fundamentalists were simply prisoners of their husbands’ dogmatism.

One evening, a man with a toothache came to see me; I saw in his file that he was a secret-police officer.

The state security headquarters in Cairo is a grim place where tens of thousands of political opponents were tortured over the 30 years of the Mubarak regime.

The officer had a rotten tooth stump, which I took great care to extract painlessly. The officer’s face relaxed, but when he shook my hand warmly, I could not control myself.

“Why do you torture detainees,” I asked him. “Aren’t they flesh and blood? Don’t they deserve some respect?”

His expression changed. Ignoring the cotton wad in his mouth, he barked back at me: “They’re traitors paid by foreign organizations to sabotage the state. In my opinion, they don’t deserve any rights because fundamentally, they’re not humans.”

An executioner always needs to dehumanize his victims, remove their individuality. Envisaging them as a hostile, dangerous and amorphous mass makes it easier for him to torture or even kill without suffering pangs of conscience.

After 30 years of practicing dentistry and writing, I am no longer convinced that they are two completely separate professions.

Dentistry delivers people of their pain and writing conveys human pain and sorrow to the readers in an attempt to make them become more humane, more sensitive and open, less inclined to rush to judgment on others, more capable of understanding their weakness and more forgiving of their errors.

They both treat one subject: humanity.