YANGON - A court in army-ruled Myanmar on Tuesday sentenced opposition leader Aung San Suu Kyi to 18 months in detention, a verdict that drew condemnation abroad and will keep her off the political stage ahead of next year's elections.

The court handed down a three-year prison term for violation of an internal security law. But that was immediately halved on the orders of the military government, which said the Nobel peace laureate could serve the time in her Yangon home.

Aung San Suu Kyi ... was found guilty of the charges and I hereby pass the sentence of three years' imprisonment, said the judge, drawing gasps from the courtroom.

Moments after the verdict was passed, however, Myanmar's home minister, Major-General Muang Oo, stood before the court and announced that the junta had decided to reduce her sentence.

Muang Oo said it had taken into account the fact that Suu Kyi was the daughter of Myanmar independence hero Aung San as well as the need to preserve community peace and tranquility and prevent any disturbances in the road map to democracy.

The road map refers to plans laid down by the junta to move toward what it sees as democracy, which culminate in multi-party elections planned for next year.

Muang Oo's intervention appeared at odds with the junta's repeated statements that its judiciary is independent.

Critics say the case was fabricated by the military to keep the charismatic Suu Kyi out of circulation ahead of the polls.

The 27-country European Union said in a statement it will respond with additional targeted measures against those responsible for the verdict.

In addition, the EU will further reinforce its restrictive measures targeting the regime of Burma/Myanmar, including its economic interests.

French President Nicolas Sarkozy backed the tougher sanctions, saying in a statement these should particularly target the resources it profits directly from -- wood and ruby mining.

British Prime Minister Gordon Brown said he was saddened and angry at the sentence, while Australia joined the EU in calling for the immediate release of Suu Kyi and all other political prisoners in the former Burma.

Suu Kyi has already spent 14 of the past 20 years in detention of one sort or another.

The latest charges stemmed from a mysterious incident in which an American, John Yettaw, swam to her lakeside home in May and stayed there uninvited for two days, which breached the terms of her house arrest and broke a security law protecting the state from subversive elements.

Yettaw was sentenced to seven years' hard labor in a parallel trial on three charges, including immigration offences and swimming in a non-swimming area.

Suu Kyi's detention was described as a suspended sentence rather than house arrest, although restrictions placed on her by the junta appeared similar to those of her previous detention.

Analysts said that by giving her the minimum sentence and then cutting it in half -- and allowing her to serve it at home -- the junta was hoping to depict itself to outsiders as lenient.

The commuted term may have been a ploy to appease Asian allies in particular, among them China, India and Thailand, whose trade has propped up a state crippled by international sanctions.

This is a very calibrated verdict in that everybody knows that the West is going to be unhappy, said Ian Holliday, a Myanmar analyst from the University of Hong Kong.

The regime is calculating that by commuting it down to one-and-a-half years and by allowing her to serve in her home rather than in prison, most Asian states will be prepared to go along with that.

Reflecting that assessment, Singapore's foreign ministry said it was disappointed by the guilty verdict.

We are, however, happy that the Myanmar Government has exercised its sovereign prerogative to grant amnesty for half her sentence and that she will be placed under house arrest rather than imprisoned, it added in a statement.

The Philippines foreign ministry called the ruling incomprehensible and deplorable and said it places doubt on Myanmar's commitment to hold free, fair, participatory, transparent, and credible elections in 2010.

The hearings were held in Yangon's Insein Prison amid tight security, with at least 2,000 security personnel in the area.

State newspapers warned Suu Kyi's supporters not to cause trouble and told outsiders not to meddle in Myanmar's affairs.

The people who favor democracy do not want to see riots and protests that can harm their goal, said a commentary carried in the New Light of Myanmar and other newspapers.

Yettaw was returned to prison from hospital late on Monday after suffering several seizures. His lawyer has said the American suffers from epilepsy, diabetes and heart trouble. Yettaw, a Mormon, told the court God had sent him to warn Suu Kyi she would be assassinated by terrorists.

(Additional reporting by James Pomfret in Hong Kong and by other Reuters bureaux; Writing by Martin Petty; Editing by Alan Raybould and Bill Tarrant)