WELLINGTON, New Zealand — Jacinda Ardern, the prime minister of New Zealand whose youth and surprise rise to power have made her a global celebrity, traveled on Thursday morning to an Auckland hospital where she was expected to give birth to her first child, her office said in a statement.

Ms. Ardern, 37, would be the first world leader in almost three decades to give birth while in office, and her pregnancy has prompted a national conversation about working mothers.

Before her election last year, she told an interviewer that it was “unacceptable” to quiz women about whether they intended to have children. When she announced her pregnancy in January, Ms. Ardern said she would not be “the first woman to multitask,” nor the first “to work and have a baby.”

Once her child is born, Ms. Ardern will take six weeks of parental leave. When she returns to work, her partner, Clarke Gayford, who hosts a television show about fishing, will become a stay-at-home father.