She said on Wednesday that she would leave her party post because her family was suffering “unbearable” scrutiny after the disclosures. Her resignation, announced during an interview with Radio New Zealand, a public broadcaster, came after it questioned her via email earlier in the day about her past.

She remains a member of Parliament until the election, when she will retire.

She said on Wednesday that the party had not asked her to quit and that she was only doing so because of the impact on her family.

Her co-leader, James Shaw, will now lead the Greens into the election. The party has traditionally used a co-leadership model, but it said on Wednesday that it would not elect a new female co-leader until its 2018 party conference.

Mrs. Turei’s resignation came eight days after Andrew Little resigned as leader of the opposition Labour Party, which was taken over by his deputy, Jacinda Ardern. Her ascension appears to have turned around the party’s sagging fortunes, as it has risen in the polls to 33 percent from 24 percent a week ago, with the Greens dropping to 8 percent from 15 percent, according to Newshub-Reid Research. The National Party has continued to hold a steady lead at 44 percent.

In New Zealand’s parliamentary system, smaller parties typically build coalitions with one of the two largest parties so they can pass legislation. Should the current polling hold up through the election, Ms. Ardern would most likely have to rely on the Green Party to form a left-leaning coalition government to prevent the National Party from maintaining control.