MEXICO CITY (Reuters) - Mexico's government on Thursday set out plans for a bigger-than-anticipated cut in public spending in 2017, with struggling state oil company Pemex earmarked for a 100 billion peso ($5.36 billion) reduction in funding.

New Finance Minister Jose Antonio Meade said the budget foresaw planned spending cuts of 239.7 billion pesos ($12.83 billion), targeting a primary surplus of 0.4 percent of gross domestic product (GDP) in 2017. It would be the first such surplus since 2008.

Of the cuts, 100 billion pesos fall on Pemex [PMX.UL], which is already facing a funding squeeze and has racked up multi-billion dollar losses for years. Since the government ended its oil and gas monopoly nearly three years ago, Pemex has faced stiff competition from the private sector.

"Pemex is making the biggest contribution to the cuts," Meade said, presenting the budget proposal to Congress a day after he was sworn in as finance minister following the resignation of Luis Videgaray.

In late 2013, the government threw open the industry to private capital to reverse a protracted slide in oil production, but falling crude prices have undermined those efforts.

Currently running at some 2.16 million barrels per day (bpd), Mexican oil production will slip to an average of 1.928 million bpd in 2017, the budget forecasts. The last time Mexican crude output fell below 2 million bpd was in 1980.

Less than two years remain before the next presidential election, and President Enrique Pena Nieto's government is struggling to ramp up economic growth, having fallen well short of its original ambition to achieve annual rates of 5-6 percent.

Hurt by uneven U.S. demand for its goods, Mexico's economy shrank in the second quarter for the first time in three years.

Next year, the budget foresees growth of between 2 and 3 percent, compared with 2.0-2.6 percent in 2016.

Despite the 2017 cuts - well above the 175.1 billion the government eyed in April - non-discretionary spending was expected to rise by 144.3 billion pesos, inflated by higher financing costs and a slide in the peso's value.

Next year the government foresees an overall deficit of 2.9 percent of GDP, 0.6 percentage points less than the 2016 target.

The budget foresaw the peso averaging 18.2 per dollar in 2017, and an average price of $42 per barrel for Mexican crude, in line with the government's hedging program.