ISLAMABAD, Pakistan (CNN) -- Gunmen shot and killed nine prison guards in eastern Pakistan on Thursday after gaining entry to a building where they were staying, officials said.
Thirty-five prison guards were in the building in the city of Lahore when four to six gunmen entered, said Muhammad Rashid, a Lahore police official.
The guards, most of them from the volatile northwestern province of Khyber Pakhtunkhwa, were in Lahore for training, Rashid said.
Habib Ur Rehman, the police chief of Punjab province, said the attack killed nine prison guards. Lahore is the province's capital.
Shortly afterward, the Taliban claimed responsibility for the act.
Ihsanullah Ihsan, a spokesman for the group, said the attack was meant to send a message that no area of the country is outside Taliban reach.
Security forces in Pakistan are often the targets of violence, with militant groups active in different parts of the country.
In a separate attack Thursday, armed militants killed six coal miners and a doctor in southwestern Balochistan province five days after they kidnapped them, a senior government official said.
"All victims have received multiple bullets on their heads and chest," said Muhammad Hashim Ghilzai, the deputy commissioner of Quetta, the provincial capital.
All seven were killed while in custody of the Balochistan Liberation Army, an insurgent group that has claimed responsibility for several bombings in the country, he said.
The group demands Balochistan be made a separate independent state free from Pakistan's rule.
Ghilzai said militants abducted the coal miners on their way back to the city from a private coal company.
An investigation is under way.