ANKARA (Reuters) - After dominating Turkish politics for a decade and a half, President Tayyip Erdogan now faces his biggest electoral challenge, from a combative former teacher who has revitalized a dispirited opposition in less than two months.

Turkey holds presidential and parliamentary elections on Sunday that are among the most important in its modern history. The winner of the presidential race will acquire sweeping new executive powers under a constitutional shake-up that Turkish voters narrowly approved in a referendum last year.

By calling early polls - they were originally set for November 2019 - Erdogan appeared to have wrongfooted his foes. But they have gained momentum with the nomination of Muharrem Ince last month as the candidate of the main opposition party, though Erdogan is still tipped to win.

A former physics teacher from northwest Turkey, Ince is an outspoken lawmaker of the secularist Republican People’s Party (CHP). Unlike many CHP politicians drawn from the Western-facing elite, he comes from a pious Sunni Muslim family.

Ince is given to folk dancing and riding tractors on visits to rural areas and sometimes dons a farmer’s cap. His sister, who wears a headscarf, occasionally joins him at rallies.

It is unclear whether Ince can win over the pious supporters of Erdogan’s Islamist-rooted AK Party. But his sharp wit and feisty rhetoric have helped him steal some of Erdogan’s thunder. He has dismissed the president as “Tarzan” for his purported mud-slinging and mocked Erdogan’s academic record.

Just days after his nomination, Ince overtook another presidential hopeful, Meral Aksener, as the opposition’s leading candidate and turned the campaign into a two-man race.

Erdogan, 64, dismisses Ince as an “apprentice”, citing what he says is his rival’s lack of experience. However, a video widely shared on social media has shown Erdogan recently saying a win is not “a piece of cake”. In an interview this week, the president floated the possibility of an coalition government.

“Erdogan can’t put his stamp on the election this time,” said Rusen Cakir, a prominent journalist who has followed the president’s career for decades.

“He is trying but he is unable to.”

MASSIVE RALLIES

After 15 years of almost non-stop campaigning through nearly a dozen elections, Erdogan still keeps to a grueling schedule as he criss-crosses the nation of 81 million people, although he has sometimes appeared weary and his speeches flat.

Up to now, he has steamrollered the opposition, which has lost election after election under CHP head Kemal Kilicdaroglu, a soft-spoken former civil servant, and his predecessor.

Ten years younger than the president, Ince has lit up crowds with a booming oratory reminiscent of Erdogan at his best.

On Thursday, what appeared to be more than 1 million people turned out at a rally for Ince in the coastal city of Izmir - roughly matching the crowd at an Erdogan rally in Istanbul over the weekend, a rarity for the CHP.

“In recent days, as Tarzan has faced trouble, he’s been rambling,” Ince told the roaring crowd. “We know he doesn’t have a university diploma, but I’m wondering if he even has a middle school one.”

Insulting the president is a crime in Turkey and Erdogan, whose lawyers have filed cases against some 1,800 people for allegedly insulting him, has also sued Ince.

Slideshow ( 20 images )

Erdogan has accused Ince of siding with terrorists for visiting Selahattin Demirtas, the jailed candidate for the pro-Kurdish Peoples Democratic Party’s (HDP), which Ankara accuses of links to the outlawed Kurdistan Workers Party (PKK) militant group.

The HDP is not part of the opposition alliance, although Ince’s visit was seen as an important public gesture to Turkey’s Kurds, who make up 15 percent of the population.

‘TO THE CLIFF’

In an interview with Reuters last month, Ince said Erdogan was driving the country “to the cliff”, saying foreign relations had suffered and monetary policy needed to be independent.

Slideshow ( 20 images )

Turkey needs a “foreign policy that is not run with extraordinary, radical, headline-grabbing, off-the-cuff statements, not blustering,” he said.

“One that doesn’t yell ‘Hey Merkel, Hey America, Hey Netherlands’.”

Polls show Erdogan falling short of a first-round victory in the presidential election but winning the run-off, while his AK Party could possibly lose its parliamentary majority, ending its 16-year uninterrupted rule.

Throughout his campaign, Erdogan has appeared in several television interviews, most at very late hours due to the Muslim holy month of Ramadan. Ratings figures show the interviews trailing behind re-runs and even weather reports.

Erdogan has also rejected Ince’s challenge to a televised debate, saying he didn’t want to give his rival the publicity.

“Erdogan, come on television with me. I won’t bite,” Ince has retorted.

Still, Erdogan is loved by millions of conservative, working-class Muslims for delivering airports, roads, hospitals and schools during years of strong economic growth.

In this election, he has promised teahouses serving free cake and giant gardens where families can “roll around in the grass” - promises mocked by Ince.

“I talk of development,” Ince told a rally in the southern province of Antalya on Tuesday. “He says we’ll open teahouses and eat cake.”