But Ms. von der Leyen seems to have the swelling support of middle-class Germans who can no longer afford to have a woman stay home and raise children. Above all, she voices no doubt that Germany would be better off if more women were like her. “I know I am a good mother,” she says, smiling.

She was not always so certain. Back when she had three children and was a part-time doctor trying to work around a village kindergarten in northern Germany that closed at 1 p.m., her husband got a scholarship to Stanford University. The family moved to California for four years, carrying emotional baggage.

“We arrived from Germany ridden with guilt,” she recalls. “I was worried about being a bad mother. My husband was worried about whether he should work even harder.”

The years in California, where she studied health economics and did research at Stanford, were a turning point. “It was the first time that I was not criticized as a mother for wanting to work or as a professional for having children,” she said. “On the contrary, the attitude in America was: You have children, that’s great. Now get to work because you have to pay for college.”

“It was liberating,” she said. So liberating that she had another four children and in 2001, went into politics.

A year later, she was family minister of her home state of Lower Saxony, and in 2005 Chancellor Angela Merkel brought her to Berlin. Ms. von der Leyen became a national star, overtaking many in her party who had served years in hopes of a similar career vault.

Since then, she has striven to remake her country somewhat in her image. If Germany does not accommodate educated women who want children and a career, those women will quit Germany. “When the signal is: If you have children, you’re out, then women who want to work have two options: Either they have no children or they emigrate,” she said. She hopes the “female brain drain” is averted. “Things are changing dramatically. When my daughters are grown up, they will say: ‘Where was the problem?”’