WELLINGTON, New Zealand -- New Zealand has formally announced it will withdraw all its troops from Afghanistan by the end of April, confirming earlier comments by Prime Minister John Key.

The withdrawal date is five months earlier than first planned.

New Zealand has stationed 145 soldiers in central Bamiyan province since 2003. The region was relatively peaceful until recently, when there was an uptick in violence.

Last month five New Zealand soldiers were killed in two incidents, accounting for half of all New Zealand soldiers killed during the conflict. Key, who last month foreshadowed the formal announcement, said planning for the earlier withdrawal began before those deaths.

Murray McCully, the minister of foreign affairs, said Monday that New Zealand needs to remove its planes before a planned upgrade of the Bamiyan airport.