New Zealand's prime minister, Jacinda Ardern, gave birth to a daughter on Thursday.

She announced her pregnancy a few months after she took office.

Pakistan's Benazir Bhutto was the first world leader to give birth while in office. She didn't take maternity leave, however, meaning that first goes to Ardern.

She plans to take six weeks off work, during which time Deputy Prime Minister Winston Peters will cover for her.

New Zealand's prime minister, Jacinda Ardern, gave birth to a baby girl on Thursday and is now the first world leader to be on maternity leave while in office.

Ardern plans to take six weeks of leave before returning to office, during which time her deputy, Winston Peters, will be in charge.

She has said she will still participate in major decisions, such as issues of national security, and will keep reading briefings while she is off but will leave the day-to-day running of government to Peters.

A pregnant Ardern addressing the New Zealand Parliament in Wellington in May. AP Photo/Nick Perry

At 37, Ardern is the youngest female world leader and only the second elected world leader to give birth while in office.

Benazir Bhutto gave birth while serving as Pakistan's prime minister in 1990, in a dramatically different political climate in which her opponents used her pregnancy as a reason to demand her dismissal. She didn't take any time off after the birth.

Ardern posted a photograph of herself, her daughter, and her partner, Clarke Gayford, on Instagram on Thursday, welcoming her new child: "Welcome to our village wee one."

"Thank you so much for your best wishes and your kindness," she wrote. "We're all doing really well thanks to the wonderful team at Auckland City Hospital."

Welcome to our village wee one. Feeling very lucky to have a healthy baby girl that arrived at 4.45pm weighing 3.31kg (7.3lb) Thank you so much for your best wishes and your kindness. We're all doing really well thanks to the wonderful team at Auckland City Hospital. A post shared by Jacinda Ardern (@jacindaardern) on Jun 20, 2018 at 11:14pm PDT Jun 20, 2018 at 11:14pm PDT

In a statement, she also said: "I'm sure we're going through all of the emotions new parents go through, but at the same time feeling so grateful for all the kindness and best wishes from so many people. Thank you."

Ardern announced her pregnancy in January. "We'll be joining the many parents out there who wear two hats," she wrote on social media at the time. "I'll be Prime Minister AND a mum, and Clarke will be 'first man of fishing' and stay at home dad."

Ardern became the leader of New Zealand's Labour Party in September and was elected prime minister a few weeks later.

The former New Zealand Prime Minister Helen Clark welcomed the birth in an email to the Associated Press and said New Zealanders had embraced Ardern's decisions.

"This is a sign of our maturity as a country and its acceptance that combining career and family is a choice which women are free to make," she wrote.

"Let's also celebrate Clarke as a modern man who is happy to be the full time parent of a young child."