Polish Jew Janusz Korczak (1878-1942) was a medical doctor, author, and children’s rights advocate.

He was also a hero of the Nazi era who, even today, remains largely unknown.

Biographer Betty Jean Lifton tells the story in “The King of Children” (Farrar, Straus & Giroux, $10.91).

Born Henryk Goldszmit in Warsaw, Korczak — the pen name he later adopted as a writer — had difficult beginnings.

His father, who may have suffered from syphilis, was in and out of mental institutions for seven years — reducing the family to poverty — and died, possibly by suicide, when Korczak was in his late teens.

The event haunted him to the point where in early adulthood he decided that he was unfit to be a husband and father.

Instead, he would lead a monk-like existence, making a vow to “uphold the child and defend his rights.”

He studied medicine at the University of Warsaw from 1898 to 1904, worked as a pediatrician from 1905 to 1912, and served for a year as a military doctor.

At a fundraiser for the Orphans Aid Society in 1909, he met Stefania (Stefa) Wilczyńska. In 1910, he quit his successful practice as a pediatrician to become the director of an orphanage for Jewish children. Stefa became his right-hand woman.

The original site was in a working-class neighborhood at 92 Krochmalna St.

Warsaw was the city Korczak loved and essentially never left. His goal was to create a just community there, aimed at moral education. Children are entitled to be taken seriously, he insisted. They have a right to be treated by adults with tenderness and respect, as equals, not as slaves.

He drew up a Children’s Constitution. The orphanage eventually published its own newsletter, developed its own peer-review court of justice (the children were allowed to “sue” not only each other, but Korczak as well), and produced plays. Property was bought in the country where the children could attend summer camp.

While Korczak was eccentric and dreamy, Stefa was a no-nonsense organizer. It was Stefa who made sure the children’s clothes and ears were clean, who lined them up for inspection before school, who made sure they had their mid-morning snack sandwich.

Some say the tragedy of her life was an unrequited love for Korczak, who though unfailingly gentle (if firm) with the children, could be abrupt and cold toward her.

Meanwhile, he gave lectures, taught, wrote newspaper articles, hosted a radio show, and authored children’s books. “King Matt the First,” the most popular, featured a Peter Pan-like boy monarch who struggles to establish a democratic society and is exiled.

Always, Korczak wanted to show the children a world that was fair, humane, and filled with beauty. Always he tried to demonstrate in his life that no matter the surroundings, the individual could sacrifice, exercise integrity, and hold his or her head high.

He and Stefa had had many opportunities to leave over the years but turned them all down. Now Jews were being rounded up, deported, shot like dogs in the streets.

He started what is now known as his “Ghetto Diary” shortly after Warsaw fell to the Nazis in 1939, and finished it during the last three months of his life in the hellscape of the Warsaw Ghetto. 

After years of going out each morning to beg for food and money for the children, he was sick, weakened, malnourished.

Still, the children were Korczak’s obsession. He took meticulous notes on their behavior, psychology, and spirituality.

“The interesting world no longer was outside of me,” he wrote. “Now it is within me. I exist not to be loved and admired, but to act and to love. It’s not the duty of my surroundings to help me, rather it’s I who have the duty to care for the world, for people.”

The Nazis began routing people with no warning from their ghetto hovels and herding them onto trains. “Resettlement in the East,” they explained: code for the extermination camp at Treblinka.

One morning, the dreaded knock came, along with the cry, “All Jews out!”

Ten staff members and 192 children, clutching their little books and toys, left the orphanage for the last time. Along with thousands of others they stood in the broiling sun all day without food, water, or toilets.

As they were about to board, a friend of Korczak’s rushed up, offering to broker a last-minute reprieve.

“Out of the question,” Korczak replied. “And leave the children alone to panic?”

When their turn came, the children, well-trained as they were, walked to the train in orderly rows of four. One boy held aloft the flag of King Matt, green on one side, a blue Star of David against a field of white on the other.

Korczak, in the lead, grasped a child by each hand. Stefa, faithful to the end, marched with her own brigade behind.

The Jewish police, stepping aside to let the procession pass, instinctively saluted. The train doors closed.

No one who passed through them was ever heard from again.

“The Poles claim Korczak as a martyr,” Lifton notes, “who would have been canonized if he had converted; the Israelis claim him as one of the Thirty-Six Just Men, whose pure souls made possible the world’s salvation.”

Let humankind claim him — and Stefa — and the children they accompanied to the gates of the netherworld.

For the kingdom of heaven belongs to such as these.