YANGON – A court in army-ruled Myanmar on Tuesday found opposition leader Aung San Suu Kyi guilty of violating an internal security law, a ruling certain to anger the West and further isolate the regime.

The court sentenced her to three years in prison but that was immediately reduced to 18 months on the orders of the military government, which said she could serve the time in her Yangon home.

A guilty verdict had been widely expected in a case critics say was fabricated by the military regime to keep Suu Kyi out of circulation ahead of a general election scheduled for next year.

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

(Reporting by Aung Hla Tun; Writing by Martin Petty; Editing by Alan Raybould)