By Gulsen Solaker and Tulay Karadeniz
ANKARA (Reuters) - Tayyip Erdogan was sworn in as Turkey's president on Thursday, cementing his position as its most powerful leader of recent times, in a step opponents fear heralds more authoritarian rule and widening religious influence in public life.
Reading the oath of office in a ceremony in parliament, Erdogan vowed to protect Turkey's independence and integrity, to abide by the constitution and by the principles of Mustafa Kemal Ataturk, founder of the modern secular republic.
Erdogan, who had been prime minister since 2003, has consistently presented his time in office as a historic mission to transform Turkey domestically and as a regional power.
Deputies of the main opposition CHP walked out shortly before Erdogan's oath. Party leader Kemal Kilicdaroglu boycotted the ceremony, arguing Erdogan breached the constitution by remaining premier for the weeks after his presidential victory.
"We're now more worried than ever about one-man, autocratic rule in Turkey," CHP deputy Aykan Erdemir told Reuters.
Around 200 protesters chanting slogans against Erdogan and carrying banners reading "Presidency cannot wash away corruption or theft" gathered later in Istanbul. Police fired teargas and water cannon to disperse the crowd.
After laying a wreath at Ataturk's mausoleum in the heart of Ankara, Erdogan's limousine was escorted by military cavalcade to the presidential palace where he was greeted by outgoing president Abdullah Gul, a co-founder of Erdogan's AK Party.
Later on Thursday, Erdogan formally asked outgoing foreign minister Ahmet Davutoglu to form a new government and be his prime minister. The cabinet lineup is expected on Friday.
Erdogan's victory in Turkey's first popular presidential election this month capped more than decade as prime minister in which the economy has tripled in dollar terms and the country has carved out a growing, though often controversial, role in the politics of the Middle East.
Opponents say his ambition to establish an executive presidential system will concentrate too much power in the hands of a leader with autocratic instincts and roots in Islamist politics, and lead the EU candidate country ever further from the secular ideals of Ataturk.
Senior representatives of some 90 states from Asia, Africa, the Middle East and Europe attended ceremonies in the evening, including the emir of Qatar and Iran's foreign minister.
There were no heads of major Western states, many of which have viewed Erdogan skeptically since a crackdown on anti-government demonstrations in June of last year.
But despite faltering ties with European partners, Erdogan used his first speech as president to say Turkey's decades long bid to join the European Union would be re-energized.
"Turkey's path to the EU, which is a strategic target, will continue more decisively," Erdogan said. Democratic reforms and a peace process aimed at ending a 30 year insurgency by Kurdish militants would also remain priorities.
Ukrainian President Petro Poroshenko had been due to attend but canceled after accusing Russia of bringing troops into the southeast of the country in support of pro-Moscow separatist rebels.
In a final speech as AK Party leader on Wednesday, Erdogan spoke of his move to the presidential palace as the birth of a new Turkey. But he vowed that the AK's mission to elevate the country as a major regional power would go on unchanged after he left party politics. He must cut party ties as head of state.
Erdogan's rhetoric has long played on the divisions between his supporters among Turkey's pious conservatives and a Western-facing, largely secular class suspicious of his Islamic ideals. In his farewell party address, he tried to strike a more conciliatory note.
"Whether they love us or not, I reach out my hand from here to every one of the 77 million people," he said. "We understand your lifestyles, your values ... We want you to understand the bans, restrictions and threats we overcame to get here today."
His combative nature was still in evidence, however, as he vowed to fight on against the "treachery" of his ally-turned-foe U.S.-based cleric Fethullah Gulen. Erdogan accuses Gulen of orchestrating a corruption scandal targeting the government through a network of followers in the police and judiciary.
Gulen denies the accusation.
That power struggle will be one of the new government's top priorities, but it will also have to cope with a slowing economy and the threat from Islamic State militants over its southern borders with Iraq and Syria.
The current economic team, including Deputy Prime Minister Ali Babacan and Finance Minister Mehmet Simsek, is expected to remain largely intact, while intelligence chief Hakan Fidan, a close Erdogan confidante, and EU minister Mevlut Cavusoglu are leading contenders for foreign minister.
Erdogan aide Yalcin Akdogan was also expected to take up a position in cabinet, possibly as a deputy prime minister, while AK deputy chairman Mustafa Sentop is seen as a candidate for justice minister, senior officials have said.
The AK party must win a stronger majority in parliament in a general election due by next June if Erdogan is to secure his ambition of changing the constitution and establishing an executive presidency.
In the meantime, he will use to the full the powers of the existing presidency which has functioned under predecessors largely as a ceremonial position. He can head government meetings and exert influence by dint of his personal authority, as reflected in a series of election victories since 2002.
(Additional reporting by Jonny Hogg in Ankara, Ece Toksabay in Istanbul.; Writing by Nick Tattersall, Daren Butler and Jonny Hogg; Editing by Ralph Boulton)