The militants targeted Mamoond village in Bajaur, located near the border with Afghanistan's Kunar province. Officials claimed that almost 300 militants launched the attack early this morning.
Two women were among the five persons killed. Three women were injured, the officials told the media. Army and paramilitary troops were rushed to the area to counter the attack.
There were reports of some militants being killed in clashes with troops but this could not independently be confirmed.
The Pakistan army had been conducting several operations against the Taliban and other militant groups in Bajaur tribal agency since 2008. The military has said it has flushed militants out of the region.
Earlier this month, hundreds of Afghan Taliban militants besieged Shalotal area of Upper Dir district in Khyber-Pakhtunkhwa province, killing 27 security personnel and seven civilians.
The militants also destroyed several schools, government buildings and mosques in the area. Pakistan has conveyed "strong concern" to the Afghan government over the cross-border attacks.
During his recent visit to Islamabad, President Hamid Karzai said Pakistan and Afghanistan need to act "aggressively and effectively" to root out terrorists and their sanctuaries from both countries.