The blast occurred outside the main gate of the hospital in Bajaur tribal area bordering Afghanistan, senior official Asad Sarwar said. The assistant political agent of the area confirmed that it was a suicide attack.
"The suicide attacker was a woman who detonated the bomb outside the main gate of the hospital," he said. Hospital sources confirmed that four people died and five others were injured.
They said that an employee of hospital was among those killed. No group has claimed responsibility for the attcak. However, authorities blame such attacks on the Taliban.
Bajaur, one of seven districts that make up Pakistan's Federally Administered Tribal Areas, had been a stronghold of the Taliban until 2008.
However, the security forces cleared the region of Taliban terrorists as the result of major offensives. Many security men and terrorists had been killed in the 2008-09 operations and some Taliban leaders had fled to neighbouring Afghanistan, officials say.
Afghan authorities arrested a senior Pakistani Taliban leader, Maulvi Faqir, in February, who is wanted to Pakistan for attacks on the security forces.
Faqir, who belongs to Bajaur, had been the deputy chief of the Taliban. Afghan government has refused to hand over Faqir to Pakistan on the plea that the two countries have no extradition treaty.
Pic: 2 Pak tribal women make history, 1st to contest polls
India knows more about terror in Pakistan than at home
Musharraf admits to deal with US on drone strikes
Bird's XI: What the greats say on Tendulkar's omission
View: Why Obama scores over us in dealing with terror