NEW YORK - Amid persisting anti-government protests, the Pakistani military is reported to be close to an agreement with the government in which the prime minister would relinquish control of security affairs and strategic foreign policy.

Citing unnamed government officials, Wall Street Journal said that the nearly two-week confrontation between the government and demonstrators, which the government believes are backed by the military, has put Prime Minister Nawaz Sharif under pressure.

Government aides said the military has seized on PM Sharif's weakened status during the political crisis to strike a deal in which he would leave strategic policy areas — including relations with the US, Afghanistan and India — to be controlled by the armed forces.

The military is now seeking guarantees from the prime minister that he will follow through on the agreement, the Journal said, citing the aides. Spokesmen for Sharif and several government ministries didn't return calls seeking comment, the paper said. A Pakistani military spokesman didn't respond to requests to comment, it said.

Since winning an outright majority in Parliament 16 months ago, the dispatch said, Sharif has angered the military establishment with efforts to assert civilian control of the armed forces and decide on policies that were traditionally the domain of the military. The deal with the military would sharply curtail Sharif's powers, and cast doubt on his ability to make peace with Pakistan's rival, India, a top priority for the prime minister.

"If Nawaz Sharif survives, for the rest of his term, he will be a ceremonial prime minister — the world will not take him seriously," Ayesha Siddiqa, an analyst based in Islamabad, was quoted as saying. "A soft coup has already taken place. The question is whether it will harden."

Government aides, according to the paper, said the military has extracted a promise of freedom for former president Pervez Musharraf, who is being prosecuted by Sharif's government for treason. That charge, related to Musharraf's military rule following the 1999 coup, is another major source of tension between the administration and the armed forces. Musharraf denies the treason charge.

According to political and security officials, Sharif's government had secretly agreed to let Musharraf go abroad after a symbolic indictment over treason, which took place in March, but the government went back on the deal. That eroded trust between the military and Sharif. Government aides said the administration was also willing to let Shahbaz Sharif step down as chief minister of Punjab.

The Journal said PPP government, which was led by Asif Ali Zardari, had also in its early days tried to push its own foreign and security policies, but it was soon beaten back.

"Nawaz Sharif thought that he was no Asif Zardari," Murtaza Solangi, an analyst who had served as head of Radio Pakistan, was quoted as saying. "But the military decided that they'll make him an Asif Zardari."

Correspondent Saeed Shah of WSJ said Sharif's election victory had also raised hopes of a shift in policy toward Afghanistan and India, citing his offer of a trade liberalisation deal to India, and pledged to Kabul that he would end Pakistan's interference in Afghanistan.

"But Sharif's stated aim of making peace with India and the pace at which he started to pursue this goal — seen in Washington as a historic opportunity — riled the military establishment. Sharif's policy of holding extended peace talks with Pakistani Taliban militants held up the army's plans for an operation against them, sowing further misgivings about the government," he wrote.

A government aide said that the personal political ambitions of the protest leaders - Imran Khan and Tahirul Qadri - had been encouraged by a military that wanted to "cut Nawaz Sharif down to size."

"The script was never to topple the government but weaken it to the point where it was just left hanging, unable to move," said the aide.

Imran Khan has called for a government of "technocrats" to be brought in now, but denied that he is acting on behalf of the military.

"I'm doing this for Pakistan, not for myself," Khan told supporters in a speech Wednesday. "To save our democracy, I'm not going from here without Nawaz Sharif's resignation."

Washington last week put out a statement of support for the administration, saying: "We support the constitutional and electoral process in Pakistan, which produced the Prime Minister of Nawaz Sharif."