ISLAMABAD, Pakistan (CNN) -- Gunmen killed a guard and a U.N. worker during a kidnapping attempt in northwestern Pakistan on Thursday, officials said.
Another U.N. worker was injured in the ambush, which happened at a refugee camp near Peshawar, the United Nations said.
The U.N. employees worked for the High Commissioner for Refugees.
They were ambushed as their car approached camp Katcha Ghari, according to police official Qazi Jamil. Four people got out of another vehicle and tried to kidnap the agency's senior field officer.
When the employees resisted, the attackers opened fire and killed him, said Amina Kamal, a spokeswoman for the refugee agency. A security guard was wounded in the leg.
One of the attackers was injured, but comrades whisked him away.
U.N. High Commissioner for Refugees Antonio Guterres condemned the attack and called for an end to the targeting of aid workers.
"There is no justification for attacks on humanitarian workers dedicated to the protection and care of the most vulnerable people," he said in a statement.
Peshawar is the capital of the volatile North West Frontier Province, where government forces have waged a massive operation against Taliban militants. An estimated 2 million Pakistanis have been displaced by the fighting, according to the United Nations.
The city near the border of Afghanistan has seen a rise in attacks blamed on Taliban militants.
Last month, a suicide bombing in a hotel in Peshawar killed at least 17 people. The attackers shot their way onto the grounds of the Pearl-Continental Hotel, which foreigners and diplomats frequent, and set off a car bomb.
The fatalities included two U.N. employees.