Islamabad: At least two people were killed and three others injured in an attack on a Shiite mosque in Islamabad, officials said, in a rare attack in the usually calm Pakistani capital.

A lone suicide bomber blew himself up after he was confronted by the mosque security guard as he tried to enter the complex during evening prayers, officials said.

The guard and one other person died, as well as the bomber. The police spokesman said that suicide vest was faulty and did not detonate completely.

"The security guard tried to stop the suicide bomber and he unsuccessfully tried to blow himself up however he was not able to detonate his suicide vest properly," he said.

The injured were taken to the government-run Pakistan Institute of Medical Sciences (PIMS) hospital in the capital.

"Two dead bodies and three injured are brought here so far, those injured are in critical condition," Dr Ayesha Ishani, a spokeswoman for the hospital told reporters.

The attack is the latest in a wave of deadly sectarian attacks. In January 61 people were killed in a suicide bombing carried out by a Taliban splinter group at a Shiite mosque, the deadliest sectarian incident to hit the country in nearly two years.

At least 23 people were killed in another attack on a Shiite mosque in northwest Pakistan last week, claimed by the Taliban.

Pakistan has suffered a rising tide of sectarian violence in recent years, most of it perpetrated by hardline Sunni Muslim groups against minority Shiite Muslims, who make up around one in five of the population.

Since June last year the army has been waging a major campaign against strongholds of TTP and other militants in the North Waziristan tribal area.

The military has heralded the success of the operation, which it says has killed more than 2,000 militants, though the precise number and identity of those killed cannot be verified independently.

The country has stepped up its fight against militants since Taliban gunmen massacred more than 150 people, most of them children, at a school in Peshawar in December.

Following the massacre, Prime Minister Nawaz Sharif ended a six-year moratorium on the death penalty and has since hung a number of convicted terrorists, angering the militant groups.