BRASILIA (Reuters) - Brazil's Prosecutor-General's Office on Friday questioned the constitutionality of President Michel Temer's proposed public spending cap and recommended that Congress shelve the austerity measures.

The office said in a statement the proposal interferes with the autonomy of other federal powers and would weaken the country's judicial system, handicapping efforts to combat corruption.

"The proposal invades the judicial system budgeting competence drastically, risking to impact the exercise of its constitutional and institutional functions," said the statement.

The unprecedented constitutional amendment, which limits the growth of federal spending to the rate of inflation for 20 years, is aimed at gradually closing a yawning budget gap that topped 10 percent of gross domestic product (GDP) last year.

It is the first of a series of austerity measures to assuage market concerns that the once-booming economy, which was stripped of its investment-grade rating last year, could be hurtling toward a debt crisis.

A lower house committee approved the proposal on Thursday, handing President Michel Temer an initial victory on the battle to pass the amendment.

Its approval requires two votes in the plenary of the lower house and two more in the Senate, needing a three-fifths majority in each.

A first vote in the full lower house chamber should take place early next week.

President Michel Temer's press office said in a statement late on Friday that the spending caps proposal treats all powers with the same criteria and equal proportions regarding budget limits.

"There is no discriminatory treatment that could be interpreted as a violation of powers separation principle," it stated.

The Prosecutor-General Office also said it was worried that the spending limits could affect a major investigation into corruption in Brazil and asked that costs with that type of work be left out of the spending limits.

Rodrigo Janot, the Prosecutor-General, leads the ongoing probe into Brazil's biggest corruption scandal centered at state-controlled oil company Petróleo Brasileiro SA.

(Reporting by Anthony Boadle, Marcelo Teixeira and Lisandra Paraguassu; Editing by James Dalgleish and Lisa Shumaker)