Media playback is unsupported on your device Media caption CCTV images show the attackers attempting to break into the compound

A suicide bomb and gun attack on a Methodist church in Pakistan has killed at least nine people, officials say.

Militants stormed the church, which was packed with worshippers at the time, in the city of Quetta, some 65km (40 miles) from the Afghan border.

The Islamic State group has said it carried out the attack.

Two suicide bombers were stopped at the entrance to the church, Sarfraz Bugti, the Balochistan region's home minister, said.

Had the men got any further, there could have been hundreds of casualties, he added.

One of the men detonated his bomb vest and the other was stopped in a gunfight with police.

Two more attackers fled and a search operation is under way, according to reports.

Image copyright AFP Image caption The church was on high alert in the the run up to Christmas

Dozens of people are known to have been wounded in the attack, which took place during a Sunday service at Bethel Memorial Methodist Church.

A witness told the BBC that several children attending Sunday school had taken shelter while firing continued around them.

A spokesman for the foreign affairs ministry, Dr Mohammed Faisal, condemned the attack.

Image copyright AFP Image caption Several children were caught up in the attack

Attacks in the mainly Sunni Muslim region are not uncommon, often targeting the Hazara Shia Muslim community in suicide bombings.

But Pakistan's Christian minority has also frequently been the subject of militant attacks, and guards had been placed near the church in Quetta as a result.