* More than 300 MPs vote in secret ballot
* Majority back an Erdogan presidential bid
* Final decision on candidacy not expected before
* Spy agency granted greater powers (Adds passage of spy agency law)
By Orhan Coskun
ANKARA, April 17 (Reuters) - Turkey's ruling party would overwhelmingly back Prime Minister Tayyip Erdogan's candidacy in the nation's first direct presidential election, senior officials said on Thursday, a move his opponents fear would feed his autocratic instincts.
The president has until now been chosen by parliament and played a largely ceremonial role. But Erdogan has said the popular vote will give the post more authority, and he has vowed to exercise its full powers if elected.
A majority of the 300 deputies in Erdogan's AK Party voted in a secret ballot on Wednesday in favour of him running in the August presidential election, party officials told Reuters.
The vote was meant as an informal test of the level of support within the party for a bid by Erdogan, which would mean him stepping down as party leader. The prime minister alone will decide on his candidacy, his aides have said.
Erdogan, who has dominated Turkish politics for more than a decade, has made little secret of his ambition to run for the job. His party's strong showing in local elections last month, despite a corruption scandal dogging his inner circle, has strengthened expectations he will do so.
But his opponents fear an ascent to the presidency would consolidate too much power in the hands of a man whose response to recent graft allegations - reassigning thousands of police and prosecutors and blocking access to social media sites - they say has betrayed his increasingly authoritarian impulses.
Parliament approved a new law boosting the powers of the secret service, or MIT, on Thursday, proposals the government says will bring it in line with international peers but which the opposition sees as another bid by Erdogan to tighten his grip on the apparatus of the state.
"MIT will from now on be able to have access to all the records of banks, public institutions, corporate entities and unions," said Atilla Kart, a member of parliament for the main opposition CHP. "The concept of professional or commercial confidentiality will lose all meaning."
Control of the NATO member's security services goes to the heart of a feud between Erdogan and Islamic cleric Fethullah Gulen, a former ally based in the United States whose network of followers wields influence in the police and judiciary.
Erdogan accuses Gulen's network of contriving the graft scandal that broke in mid-December as part of a plot to undermine him. His aides have said his determination to see off the threat may mean him abandoning any presidential bid and staying on instead for a fourth term as prime minister, currently a more powerful post.
Gulen's followers have denied any role in the corruption scandal and have accused Erdogan of a witch hunt.
If Erdogan were to seek a fourth term as prime minister the AK Party would have to vote to change its internal rules and remove a three-term limit for its parliamentary deputies, something to which he has repeatedly said he is in principle opposed.
"An overwhelming majority within the party says that Erdogan should become the president and the results of the voting have depicted that as well," a senior party official told Reuters after Wednesday's secret ballot.
"A small group said Erdogan should not run in the elections as there will be critical developments ahead during which his leadership will be much needed," the official said.
The AK Party's deputy chairman, Huseyin Celik, said on Wednesday that the group would hold a series of meetings on the presidential election culminating in early May, after which a decision would be announced.
Incumbent President Abdullah Gul was the second choice of presidential nominee in the secret ballot, officials said. Gul is a close Erdogan ally and co-founder of the party, and is tipped as a possible prime minister should Erdogan run.
Until now, parliament has elected Turkey's head of state. Erdogan has said the popular vote would confer additional authority on the currently largely ceremonial post, although he ultimately wants an executive presidency for Turkey.
"If I step into the presidency post, I would be the people's president. I would use my full competencies," Erdogan was quoted by the daily Hurriyet newspaper as telling MPs at Wednesday's meeting, adding that he had not yet decided on a bid.
He also signalled that whatever happened, the fight would continue against Gulen's Hizmet ("Service") network, whose members say they number in the millions.
Erdogan accuses what he describes as a "parallel state" of orchestrating the corruption scandal against him, including by illegally wiretapping thousands of government phones over years and leaking manipulated recordings on social media.
Erdogan relied on Hizmet's influence to break the grip on politics of the army, which carried out three coups between 1960 and 1980 and forced an Islamist-led government from power in 1997. But he now casts the feud with Hizmet as a continuation of that struggle against tutelage in any form.
"Whether I remain as the prime minister or become the president, the fight against the parallel structure and gangs will continue," he was quoted as saying. (Additional reporting by Gulsen Solaker and Jonny Hogg in Ankara; Writing by Humeyra Pamuk and Ece Toksabay; Editing by Nick Tattersall and Jon Boyle)