Image copyright bbc Image caption Maj-Gen Hayat is seen handing envelopes full of money to protesters

A video showing a senior Pakistani army officer distributing money to anti-government protesters in Islamabad has prompted a fierce reaction on social media.

The footage is being interpreted by some as rare evidence of the "soft spot" the military is believed to have for religious groups, whose support can be mobilised against mainstream political parties.

The demonstrators blocked a main road in Islamabad for three weeks until the military brokered an end to the protest on Monday after a botched police operation. The law minister then resigned, meeting a key demand of the protesters who had accused him of blasphemy.

The deal was seen as capitulation by the civilian authorities under pressure from the military.

In the video, director-general of the Punjab Rangers Maj-Gen Azhar Navid Hayat is seen giving envelopes containing 1,000-rupee ($9.50; £7) notes to participants in the protests, who were described as having no money to pay their bus fare home.

"This is a gift from us to you," the general is heard telling one bearded man. "Aren't we with you too?"

He then goes on to pat another protester on the cheek and offers a reassurance that, "God willing, we'll get all of them released" - presumably a reference to arrested protesters.

"This is all we had in one bag. There's some more [money] in the other," Gen Hayat says, before the footage ends.

The video was shot by Dawn News TV reporter Shakil Qarar on his mobile phone. He says it was run on the Dawn News website but has no idea how footage without the Dawn News logo ended up on social media.

There was no immediate reaction from the military, which has long played a prominent role in the country's politics.

Image copyright AFP Image caption The protests turned violent over the weekend before the civilian government gave in

No politicians from the governing party or the opposition have commented and TV channels have refrained from running the footage, perhaps reluctant to antagonise the powerful military.

The Nation and Dawn newspapers did cover the story but did not headline it, and it got a back-page mention in the Urdu-language daily Jang.

However, there has been fierce reaction from some Pakistanis on social media.

Omar R Quraishi, a Samaa TV journalist, asked whether it was a good use of taxpayers' money.

Taha Siddiqui, a France-24 reporter who recently got into trouble for his frequent anti-military comments, tweeted that the video did not shock him.

Former editor of Dawn newspaper and ex-head of the BBC Urdu Service Abbas Nasir wondered if the army had created the crisis, as well as defusing it.

Talat Aslam, chief editor of The News, another English-language newspaper, spoke of his frustration at the weekend's events.

Perhaps the most witty media comment came from Mochi - an anonymous account that has been commenting on Pakistan's unending civil-military tensions.

Tweeting in Urdu, Mochi made a comical reference to a decades-old allegation by many circles in Pakistan and abroad that the Pakistani military nurtures Islamist groups so it can use them as leverage to extract money from the West.

Another tweeter, Saleem, sent out a similar message when he juxtaposed the scene of the major general handing money to protesters with a picture of an army officer garlanding Nek Mohammed, the first-ever Pakistani Taliban leader who was killed in a US drone strike in 2004.