* PM Rajoy needs backing from opposition for budget
* Edging towards deal with some rivals, ups social spend
* Offers civil servants pay rise, more teacher jobs (Updates after budget approved by cabinet, adds quotes)
By Sarah White and Paul Day
MADRID, March 31 (Reuters) - Spain's minority government unveiled a pay rise for public workers and more spending on social measures in a delayed draft budget for 2017 on Friday, steering further away from years of austerity as it tries to win opposition support for the bill.
The budget will test conservative Prime Minister Mariano Rajoy's chances of seeing out his four year mandate, after he was reinstated for a second term last October with the weakest grip on parliament in modern Spanish history.
His prospects look improved on a few months ago after he secured support for the budget from the fourth biggest bloc and as he inches closer to a deal with some regional parties, with promises of spending on infrastructure and social measures. The draft budget - approved by Rajoy's cabinet eight months late after two inconclusive elections left the country without a government for much of 2016 - will now be subject to tweaks in parliament and then a vote.
Robust job creation and exports have brightened the outlook over the past two months and could ease the slowdown in growth, as improving public finances give Rajoy more wriggle room on spending. It has earmarked more funds to combat child poverty and help the unemployed, with plans to grant some 250,000 permanent contracts to temporary workers in the public sector. It also targets 8,000 new jobs for teachers and police.
Civil servants will get a 1 percent pay rise, though inflation this year is forecast at around 1.5 percent.
Even so, overall public spending will not increase in 2017, as the government works to shrink the deficit to 3.1 percent of output from 4.54 percent in 2016.
The government also agreed to lower value-added tax on theatre and concert tickets, after tax hikes in the arts sector in 2012 proved deeply unpopular.
"This is a budget that will help feed economic growth and job creation," Budget Minister Cristobal Montoro told a news conference. "It emphasises social spending, it's a bet on stable public sector employment."
Spain's public deficit in 2016 fell within targets agreed with the European Union for the first time since the global financial crisis.
Rajoy's centre-right government will rely on strong growth and tax revenues this year to whittle it down further, rather than the spending cuts that characterised most of his first term.
The government said it would stick for now to a "very conservative" forecast of 2.5 percent economic growth this year. Some economists predict the economy may expand faster.
Data is, however, still mixed. Retail sales fell in January for the first time in almost two and half years as inflation spiked. They were flat in February, data on Friday showed.
Two opposition parties, the centre-left Socialists and anti-austerity Podemos ("We Can"), have already said they will vote against the budget in parliament.
The Socialists said the 1 percent public sector pay rise was insufficient to protect people's purchasing power.
After clinching the deal with the fourth-largest force in parliament, centrists Ciudadanos ("Citizens"), to back the bill, Rajoy is wooing regional parties in the Canary Islands and Basque Country to get him across the line.
Rajoy's People's Party (PP) holds 137 of parliament's 350 seats and 176 votes are required to pass the budget into law. ($1 = 0.9359 euros) (Additional reporting by Carlos Ruano; Editing by Alison Williams and Richard Lough)