The incident occurred in Mirali town, according to police officials. The deceased were identified as Zubaidullah Khan, Farmanullah Khan and Naimatullah Khan.
Zubaidullah Khan was a Civil Services of Pakistan officer who had served on different posts in Islamabad. He had been visiting his village on Eid.
They had been on their way back home after meeting relatives when the attackers opened fire on them, officials said.
The assailants managed a clean getaway from the scene. Police said they were investigating the matter.