(Refiles with no change to text)
* Analysts see split in army: some soldiers back protesters
* But most top brass allied with royalists, business elite
* Source says "red shirt" protesters operate on two fronts
By Jason Szep and Ambika Ahuja
BANGKOK, April 13 (Reuters) - Who were the shadowy gunmen firing on troops in Bangkok's bloody riots last weekend, and who fired the grenades?
The answers to those questions could point to the emergence of a dangerous split within Thailand's armed forces, one that could spark more bloodshed unless the beleaguered government calls elections promptly to defuse the political tensions.
Saturday's clashes, which killed 21 people and wounded hundreds, were not only Thailand's worst riots in 18 years, but may also have taken the country closer to the worst-case scenario in its five-year-old crisis: a fissure in the military along social and political fault lines dividing the country.
Although the city has since calmed down, tens of thousands of anti-government "red shirt" protesters remain on the streets of Bangkok demanding Prime Minister Abhisit Vejjajiva dissolves parliament.
For full coverage, click on [ID:nTHAILAND]
For a graphic: link.reuters.com/rap67j ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^>
Analysts say large numbers of soldiers of lower ranks and some senior officers have long sympathised with the mostly rural and working-class "red shirt" movement behind more than a month of protests demanding immediate elections.
Many of the military's top brass are at the other end of the political spectrum, allied with royalists, business elites and the urban middle classes, who wear yellow or pink at counter-protests and broadly back the 16-month-old government.
"I'm not sure the government is particularly confident about the loyalty of some of the mid-level commanders and especially a lot of the foot soldiers," said Federico Ferrara, a political science professor at the National University of Singapore.
"The situation for the government is a lot more tenuous."
Army and government sources said the red shirts received arms and support on Saturday from a rogue military faction that includes retired officers and is allied with twice-elected and now fugitive former premier Thaksin Shinawatra, a divisive figure removed in a 2006 coup after graft allegations.
An army official who asked not to be identified said many mid-ranked and senior officers allied with Thaksin during his 2001-2006 administration were sidelined, and are now throwing their weight behind the "red shirts" to win power back.
"There would definitely have been some involvement of some people in the military with the protesters. The military is no longer a unified entity," said Pavin Chachavalpongpun, a research fellow at the Institute of Southeast Asian Studies in Singapore.
FISSURE IN THE MILITARY
A high-level source close to Prime Minister Abhisit described the "red shirt" movement as operating with two distinct fronts -- the peaceful, non-violent protesters who staged a series of rolling street rallies in Bangkok since March 14 and a separate wing led by former and current generals in the army.
The fissure in an institution central to Thailand's power structure is deepening uncertainty over the outlook for Southeast Asia's second-largest economy, in part because neither side prevailed on Saturday, leaving two groups with military muscle at odds with each other.
"There was no absolute win for either side," prominent historian Charnvit Kasertsiri said of Saturday's fighting. "When the government is no longer the only user of force, then it spirals into anarchy."
The Bangkok Post newspaper quoted a colonel likening the standoff between the two militarised groups to civil war.
Government and military sources said former army chief Chavalit Yongchaiyudh, a former prime minister and close ally of Thaksin, led other current and former generals in providing support to the "red shirts".
Chavalit has denied involement in Saturday's protests, which marked a violent escalation from the pattern of rallies seen during Thailand's polarising political crisis.
TV footage showed some protesters armed with assault rifles or machine guns. M79 grenades were fired at soldiers. Grainy photographs showed at least one sniper positioned in a building.
The coalition government, which came to power in a 2008 parliamentary vote with tacit backing from the military's top leaders, says its troops only fired in the air. It has not been able to explain how at least nine protesters died from high-velocity gunshot wounds.
Publicly, the government blames a "third hand" for stirring up the violence. Privately, it says arms and extra forces were supplied by pro-Thaksin renegades who they believe also targeted and killed a key military figure on Saturday, a colonel who suppressed a red shirt protest last year.
There is no doubt that Chavalit is a protagonist in the political drama now unfolding: immediately after Saturday's mayhem he called on Abhisit to dissolve parliament.
In October, Chavalit became chairman of the red shirts' parliamentary wing, the Puea Thai Party. He then persuaded scores of retired soldiers to join with him in what was seen as a move to create divisions in a normally rock-solid institution.
He made headlines last year by traveling to Cambodia for discussions with Cambodian Prime Minister Hun Sen, who days later infuriated Thailand's leaders by offering Thaksin a job as economic adviser and a base in Cambodia.
The worsening split, government sources say, is transforming life at a military base where Abhisit and other senior cabinet officials now regularly meet, and sometimes sleep. Officials say their plans are being leaked from the base, the 11th Infantry Battalion of the Royal Guard.
"We don't know who to trust," said a senior government official. "We sit for lunch in the same cafeteria. Yet with us are people on the side of Thaksin," said the official, who declined to be identified so he could speak candidly.
IS A COUP POSSIBLE?
It is unclear how far the military and its backers will go to save the government and how far they will resist the re-emergence of Thaksin's allies, who would stand a good chance of returning to power in an election.
Much depends on an internal jostle for power in a country where the military is closely aligned with the monarchy and at a time when 82-year-old King Bhumibol Adulyadej has been in hospital since September, adding another element of uncertainty.
Army chief Gen. Anupong Paojinda, a moderate who retires in September, said on Monday the crisis needs a political solution and called for the dissolution of parliament to clear the way for elections. But royalists in the army are not ruling out a coup. Thailand has had 18 coups in the past 77 years.
"There is definitely a disagreement among the top brasses," said a regional commander, who declined to be identified. "Those very rightist and royalists are not ruling out the options of launching a coup and/or a heavier crackdown." (Editing by John Chalmers and Ron Popeski)