A bomb attack killed seven police officers attending the funeral of a colleague in Ingushetia in Russia's North Caucasus region, hours after masked gunmen opened fire in a mosque in Dagestan, killing one and wounding eight people.

The seven policemen were killed and 10 others wounded when a bomber attacked a wake being held on Sunday for a fellow officer shot a day earlier in the Malgobek district in the north of the Russian province of Ingushetia, news agencies reported.

"A suicide bomber went into the courtyard of a private home, where police officers had come to offer condolences to their late colleague and activated a bomb device attached to a belt," a spokesman for the local investigators, Zurab Geroyev, told the Interfax news agency.

The bombing came hours after masked assailants opened fire in a mosque in the nearby Dagestan region, killing one and wounding eight Muslims who were celebrating the end of the holy month of Ramadan. A man who was injured in the attack said some 50 people were gathered in the mosque at the time of the attack.

"We were sitting, just finished our prayer and wanted to break our fast," said Rukhit Samedov, wearing a blood stained T-shirt and cradling a bandaged hand.

"People just sat down, started eating, and the door opened and there was shooting from automatic guns," he told Reuters.

"They wore masks and some sort of camouflage."

Law enforcement officers said they were working to deactivate bombs left by the attackers at the mosque in the city of Khasavyurt.

"Eight people have been admitted to the hospital. Five of them are in the trauma unit, three are in intensive care. Two of those are in a very grave condition," Ramazan Ismailov, the chief surgeon at the Khasavyurt hospital, told Reuters.

Eid ul-Fitr, which marks the end of the holy month of fasting of Ramadan, is celebrated between Sunday and Tuesday this year.

Legal Notice: Copyright, trade marks and other intellectual property rights in this website can not be reproduced without the prior permission.