WELLINGTON, New Zealand (AP) _ A 45-year-old farmer's wife and former schoolteacher won the ruling party's endorsement Tuesday to become New Zealand's first woman prime minister.

The unanimous approval of Jenny Shipley by 44 caucus members of the conservative National Party came a day after Prime Minister Jim Bolger agreed to resign rather than face a potentially humiliating challenge.

Shipley's own first political challenge is expected later Tuesday, when the opposition Labor Party will debate whether she is too far to the right to gain the confidence of Parliament.

Previous confidence votes generally have been won by the governing coalition and supported by other center-right parties.

But Labor leader Helen Clark said Shipley, whose political position is further to the right than that of Bolger, must have her mandate to govern tested.

``It's the direction of the government that's the problem. People will look at Mrs. Shipley's record and say that's worse'' than Bolger's, Clark said.

Shipley was expected to name a reshaped Cabinet soon, after consultations with her New Zealand First coalition partner. She said she doesn't expect a change in the current coalition that controls Parliament, however.

Bolger's announcement Monday followed a day of intense negotiations in which Shipley delivered an ultimatum to Bolger: Either go quietly or face a leadership challenge.

Bolger, 62, has led the National Party since 1986 and has been prime minister since 1990. His retirement follows months of speculation that Shipley was preparing to exploit dissent in the New Zealand First party by challenging Bolger's leadership.

Bolger said Tuesday he knew when he returned from the Commonwealth summit in Scotland late last week the caucus numbers were against him.

``Changing circumstances make it appropriate for me to step down as prime minister,'' he said.

Bolger's term as prime minister will end later this month after he represents the country at the Asia-Pacific Economic Conference summit in Vancouver and makes a short visit to Beijing.

The leadership change was received well in New Zealand's financial markets.

The New Zealand share market rose 61.89 points in opening trading Tuesday to 2,452.09, and the New Zealand dollar was firmly entrenched above 63 U.S. cents from its low of 61.80 U.S. cents during the political turmoil Monday.

``I think Jenny Shipley is seen as fairly right wing so I don't think there are any problems there,'' said Murray Doyle of BT Securities.

Shipley, the daughter of a church minister and a mother of two, is best known for cutting support for the poor as social welfare minister in the first of three Bolger governments.

She was demonized by the public in the early 1990s, when her effigy was regularly burned on the streets in protest of her policies.