New Zealand's prime minister announced on Friday that she is expecting her first child in June.

Jacinda Ardern, 37, took office in October. Speculation swirled around whether she would start a family soon when she took over the leadership of her then opposition Labour Party last year.

Ardern took to Twitter to announce that she and her partner Clarke Gayford were expecting a child, and that Gayford would become a stay-at-home dad.

"We thought 2017 was a big year! This year we'll join the many parents who wear two hats. I'll be PM & a mum while Clarke will be 'first man of fishing' & stay at home dad," she tweeted.

She said in a statement that she had asked Deputy Prime Minister Winston Peters on Thursday to act as prime minister for six weeks after the birth.

"I fully intend to be contactable and available throughout the six-week period when needed," she said. "I will make arrangements for appropriate ministers to act in my other portfolios over the six weeks I am away from Parliament."

After the six weeks, she will resume all her prime ministerial duties.

"Clarke and I are privileged to be in the position where Clarke can stay home to be our primary care-giver. Knowing that so many parents juggle the care of their new babies, we consider ourselves to be very lucky," she said.

"Clarke and I have always been clear we wanted to be parents but had been told we would need help for that to happen. That's made this news a fantastic surprise," she added.

The couple discovered she was pregnant on Oct. 13 — two weeks before she was sworn in as national leader.

Within a day of Ardern becoming Labour Party leader, seven weeks before the election, she was twice asked by television hosts about her plans for children. One host, Mark Richardson, questioned whether it was acceptable for the country's leader to take maternity leave while in office, and said most employers would want to know the maternity plans of their workers.

Ardern, who has previously talked about the difficulties of juggling political life while also wanting to start a family, said she was happy to answer such questions, but others shouldn't feel compelled.

"For other women, it is totally unacceptable in 2017 to say that women should have to answer that question in the workplace," she responded, while pointing her finger at Richardson. "That is unacceptable."

Her answers seemed to resonate with many people, some of whom pointed out that under New Zealand law, workplace discrimination on the basis of pregnancy is illegal. Ardern said she was surprised her comments were picked up abroad.