A Pakistani army helicopter crashed Friday on its way to an inauguration at a resort in the country’s north, killing four foreigners — ambassadors to Islamabad from the Philippines and Norway, as well as the wives of the ambassadors from Malaysia and Indonesia — and a three-member crew in what was one of the worst such incident in the country involving a high number of foreign dignitaries.

ISLAMABAD — A Pakistani army helicopter crashed Friday on its way to an inauguration at a resort in the country’s north, killing four foreigners — ambassadors to Islamabad from the Philippines and Norway, as well as the wives of the ambassadors from Malaysia and Indonesia — and a three-member crew in what was one of the worst such incident in the country involving a high number of foreign dignitaries.

The air force said a technical failure caused the crash while Prime Minister Nawaz Sharif, who was flying to the same event on a separate aircraft, declared Saturday a day of national mourning. Twelve passengers, many of them diplomats, who were injured in the crash were being treated at a local hospital, officials said.

Hussain Khan, a police officer at the crash site Naltar, said he saw the helicopter stall in midair, then come down in an erratic manner as if the pilot had no control over it — then plunge to the ground.

“The helicopter was preparing to land at a helipad near a school, when it suddenly …. crashed and caught fire,” Khan told The Associated Press over the phone from Naltar.

Security forces scrambled to rescue survivors and transport the dead and injured to a nearby hospital, Khan added.

Hours after the crash, the Pakistani Talban issued a statement claiming they had shot down the helicopter with an anti-aircraft missile. The claim, though impossible to independently verify, appeared to be an opportunistic attempt to take responsibility for such a high-profile incident.

The air force said a technical failure had caused the crash but did not elaborate on the nature of the glitch. Air force spokesman Syed Muhammad Ali said the fire, which engulfed the aircraft shortly after the crash, caused the high number of fatalities.

Pakistani army spokesman, Maj. Gen. Asim Bajwa, tweeted that the MI-17 helicopter was forced to make an emergency landing. He said the surviving passengers, including the Dutch and Polish ambassadors to Pakistan, received “varying degree of injuries.”

The helicopter with the diplomats was on route to Naltar, where Sharif was also to attend a public ceremony to inaugurate a newly installed chair-lift at a ski resort.

A statement from his office said Sharif was flying on a special government plane to Naltar when the “tragic news” was conveyed to him. It said Sharif returned to Islamabad after hearing of the crash.

Earlier, the Pakistani Foreign Ministry said the heads of diplomatic missions from more than 30 countries, along with their family members and some Pakistani dignitaries, had been flown to the city of Gilgit by a C-130 aircraft.

“From there, they were being taken to Naltar in four helicopters for a three-day excursion trip,” the ministry said.

The Philippine Department of Foreign Affairs said it was “deeply saddened” by the death of Ambassador Domingo Lucenario Jr., and that his colleagues in Manila observed a two-minute period of silence in commemoration. Lucenario, 54, also served as non-resident ambassador to Afghanistan, Kyrgystan and Tajikistan. He is survived by his wife and three children.

Norwegian Foreign Minister Borge Brende confirmed the death of Ambassador Leif H. Larsen, describing him in a statement as, “a well-liked and highly respected colleague. His friends and colleagues in the Foreign Ministry and across our foreign stations are today in sorrow.” Larsen, 61, is survived by a wife and a son.

Malaysia’s foreign ministry confirmed that the wife of its high commissioner to Pakistan perished in the crash. The high commissioner Hasrul Sani Mujtabar survived the incident and currently being treated at the Gilgit hospital, it said.

Romania’s ambassador to Pakistan, Emilian Ion, was on the same helicopter and survived, the Romanian Foreign Ministry said. Pope Thrower, assistant spokesman for the U.S. Embassy in Islamabad, said that “no American Embassy personnel participated in this trip.”

Hours after the crash, Indonesia’s Minister of Foreign Affairs Retno Marsudi confirmed in Jakarta that Heri Listyawati, the wife of Indonesia’s ambassador, was killed while her husband, Burhan Muhammad, survived with injuries.

In Poland, the Ministry of Foreign Affairs said in a statement that the Polish Ambassador Andrzej Ananicz and his wife, Zofia, were on board the helicopter and that “both suffered injuries, which were not life threatening.”

The prime minister’s statement expressed “deep grief and sorrow over the tragic incident” and said he “extended heartfelt condolences to those who lost their lives in this incident.”

Sharif declared Saturday a national day of mourning, according to his office, which also said that helicopters were evacuating the injured diplomats and that the bodies of those killed will be transported to Islamabad.

“We are making arrangements to send the bodies of the diplomats to their countries with full honour,” Chaudhry told state-run Pakistan Television.

Later, Chaudhry told reporters in Islamabad that taking the diplomats to Naltar was meant to promote tourism in the scenic region. He ruled out the possibility of sabotage. He added that the bodies of those killed could not immediately be brought to Islamabad due to bad weather.

Pakistani security forces have been fighting militants in the country’s northwestern tribal regions bordering Afghanistan for the past several years. Pakistan launched a massive operation in the North Waziristan tribal region last year. Since then, the army says it has killed more than 1,200 militants there.

The crash area in Naltar is several hundred kilometres (miles) from North Waziristan.

Although aircraft and helicopter crashes are not uncommon in Pakistan, Friday’s incident was the worst since 2010, when a Pakistani air plane crashed near Islamabad, killing 146 passengers. Another Pakistani passenger plane crashed near Islamabad in 2012, killing 121 passengers and six crew members.