* President accused of plotting against would-be PM
* Clandestine meeting at chateau exposed
* Long-standing feud between president, former allies
* Intrigue risks causing political paralysis
PRAGUE, Nov 19 (Reuters) - It had all the elements of a spy thriller: a convoy of cars with tinted windows, a Baroque castle outside the Czech capital, a clandestine meeting of senior politicians.
This though was real, it happened late last month, and it was the culmination of a battle for power between the Czech President Milos Zeman and former allies who nearly ended his political career 10 years ago.
In what Zeman's opponents call an unsuccessful coup d'etat, the president is accused of trying to block Bohuslav Sobotka, the leader of the Social Democratic party, from becoming prime minister, in concert with rebels inside the party.
Zeman, who hosted the rebels at the castle, has said little about the events, except that the meeting was not called at his initiative and need not have been kept secret.
Indeed the meeting between Zeman and the anti-Sobotka plotters was exposed and a weakened president has accepted that Sobotka has the right to form a government.
But few people inside the Czech political elite think the drama is over. The tricky process of forming a coalition government could present new opportunities to rock the boat.
That could create prolonged political paralysis at a time when decisive action is needed to lift the economy. Data released this month showed the economy had slipped back into recession in the third quarter of this year.
That is bad news for foreign investors - dominated by firms from neighbouring Germany such as Volkswagen and Siemens - who came to the Czech republic for its robust growth and predictable politics.
The drama that played out last month has its roots in events in 2002. Zeman had finished a successful stint as a Social Democratic prime minister, and his party invited him to be its candidate in the presidential election.
At a meeting of the party's members of parliament to discuss Zeman's candidacy, there was a sudden turn-around. Senior party figures, including some Zeman had groomed as his proteges, changed their minds and withheld their support.
Sobotka, then finance minister, was one of those who voted against Zeman, according to Czech media. Sobotka has declined to answer questions about whether he voted against Zeman.
Zeman felt betrayed. Zeman, according to his memoirs, told his party colleagues at that meeting he felt like Premysl Otakar II, a 13th century Czech king who was killed when some of his nobles deserted him on the battlefield.
After this, Zeman retreated to his farm-house in the remote Vysocina region, about 120 km south-east of the capital.
He spent his days at home, or calling into the local pub. In the summer, he was often photographed lying in a small inflatable dinghy on a neighbourhood pond.
But he had not forgotten. His memoirs, "How I was wrong in politics," published two years into his retirement, contained withering descriptions of the people he felt had betrayed him.
Earlier this year, Zeman seized his opportunity to return. He won election as president, playing on his support among working class voters in the provinces, and his reputation as a man with the common touch.
He quickly asserted power, even though the presidency is a largely ceremonial post. After the previous, centre-right government folded this year, he went against the will of political parties and installed a caretaker government of his allies.
In last month's parliamentary election Sobotka's party won more votes than any other party, but less than they had anticipated. Sobotka was vulnerable, especially as there were rivals for the leadership in the party, who were also close to Zeman.
As night fell on Saturday, Oct. 26 and the election results came in, Sobotka was in the studios of Czech television taking part in a live broadcast.
At about the same time, at least two sedan cars headed out of Prague, drove along country roads and then through the wrought iron gate into Lany Castle, a presidential retreat set in woodland 40 km (25 miles) west of Prague.
The next day, the pro-Zeman faction inside the Social Democratic party attempted to dump Sobotka, winning a majority in the party's leadership for a non-binding resolution calling on their leader to go.
Yet the rebellion turned out to be more farce than spy thriller. A crew from Czech television managed to follow the convoy of cars to the castle. When the journalists asked a sentry at the gate who was inside, he gave them the names of Sobotka's party rivals.
One of the rebels at the meeting later said it took place, even though fellow participants were denying it. Several of the rebels had to back down and apologise. Their leader, Michal Hasek, stepped down from his post as first deputy chairman of the Social Democrats.
In his only public comments on the meeting, Zeman told the Pravo newspaper: "I do not see anything strange about the content of this meeting and I see it as a bit comical that it was kept in secrecy." Zeman also said it was Hasek, not him, who had initiated the meeting.
Asked by Reuters if Zeman had discussed with the rebels plans to force out Sobotka, the presidential administration said it had no comment beyond what the president had said in the newspaper interview.
The incident shifted the balance of power back in Sobotka's favour. Social Democrat insiders do not want to criticise the head of state publicly, but they say in private Zeman tried to engineer a coup and was beaten.
They say though that he will be back. Sobotka will start negotiations soon on forming a coalition between his party, the second-placed ANO party, run by business tycoon Andrej Babis, and the centre-right Christian Democrats.
Sobotka will have to bridge big differences over policy.
If this process falters or drags on for a long time, Zeman, who under the constitution has the power to appoint a prime minister, could assert his influence again.
There is though a potential check on Zeman. If enough members of parliament support it, they could vote through a constitutional amendment to trim the presidential powers.