Image caption Prime Minister Yousuf Raza Gilani: 'There can be no state within a state'

Conspirators are plotting to bring down Pakistan's civilian government, Prime Minister Yousuf Raza Gilani has said.

Without specifically blaming the military, he said it was accountable to parliament and no institution could be a state within a state.

His government is struggling with a memo scandal that has forced the resignation of the Pakistani ambassador to the US and threatens the president.

The leaked memo allegedly asked for US help to prevent a military takeover.

Correspondents are describing Mr Gilani's tirade as an unprecedented attack by a civilian leader on Pakistan's powerful military.

"I want to make it clear today that conspiracies are being hatched here to pack up the elected government," the prime minister said in a speech at the National Arts Gallery in Islamabad.

Nobody is above the law, all the institutions are subservient to the parliament Yousuf Raza Gilani, Pakistan Prime Minister 'Memogate' bodes ill for ZardariNew envoy has 'toughest job'

"But we will continue to fight for the rights of people of Pakistan whether or not we remain in the government."

Later, in parliament, he said: "There can't be a state within the state. They have to be answerable to this parliament."

The BBC's M Ilyas Khan in Islamabad says there has always been an impression in Pakistan that the powerful military and its intelligence services are a state within the state.

But successive military and civilian rulers have kept up the appearance that the military is a subordinate institution of the state. Mr Gilani's defiant comments and tough language throw the issue open to debate, our correspondent says.

Bin Laden raid

Pakistan's President, Asif Ali Zardari, has recently returned to the country after seeking medical treatment in Dubai. The 56-year-old denies any role in the memo.

His illness and the scandal surrounding the memo have led to speculation that he might be forced out of office.

Analysis Prime Minister Gilani made his unprecedented remarks - perhaps his most direct attack on the military - in the context of Osama Bin Laden's killing. He said the commission he set up to investigate how Bin Laden was able to live in Pakistan undetected for six years, had, under military influence, now come around to investigating his own government for issuing visas to alleged US agents who tracked down Bin Laden. Mr Gilani said the civilian government provided a defence to the military against international pressure after Bin Laden's killing. Also, his government doubled the salaries of the soldiers despite financial constraints to acknowledge their sacrifices. But, he said: "they cannot be a state within the state. They have to be answerable to this parliament". Mr Gilani's outburst is indicative of the pressure the military is reportedly exerting on his government over the memo scandal. It also indicates that the government has decided to confront the military on this issue, a move which no civilian government has made in Pakistan before.

Pakistan's Supreme Court has opened a hearing into the memo and demanded a reply from the president.

Tensions are high between the civilian government, which has ruled since elections in February 2008, and Pakistan's powerful military and intelligence services, after US forces killed Osama Bin Laden in Abbottabad in May. The army was not told about the raid in advance.

Mr Gilani also referred to the controversy over the late al-Qaeda leader, querying how he had managed to get into Pakistan and live there for six years apparently undetected.

He reminded parliament that his government had given "solid support" to the army and its intelligence agency, the ISI, following the raid, which deeply embarrassed the military.

A strike by Nato forces on a Pakistani border post in November killed 24 Pakistani soldiers. This has caused outrage in Pakistan and made it more difficult for the civilian government to defend its policy of co-operation with the United States.

The army has ruled Pakistan for much of its history and has carried out three coups.

Some analysts have speculated that the "memogate" affair is a conspiracy by the army to embarrass the government.