YANGON - A court in army-ruled Myanmar upheld its guilty verdict on opposition leader Aung San Suu Kyi Friday, a legal source said, a ruling likely to keep the Nobel laureate in detention until after next year's elections.

The court source, who asked not to be identified, said the judge dismissed an appeal by Suu Kyi's legal team, which argued that her 18-month house arrest for a security breach was unlawful because it was based on legislation no longer in use.

Prior to the hearing, lawyer Nyan Win, said the National League for Democracy (NLD) party leader would continue to fight for her freedom, whatever the outcome.

We have done our best to prove her innocence, Nyan Win told Reuters. If she is not acquitted, we are prepared to make another appeal at the Supreme Court.

Suu Kyi was found guilty in August of breaking a law protecting the state from subversive elements when, while under house arrest, she allowed an American intruder to stay at her lakeside home for two nights.

The ruling sparked international outrage and was widely dismissed as a ploy to keep Suu Kyi out of next year's elections, the first since 1990, when the NLD scored a landslide victory that the ruling junta refused to recognize.

However, even if Suu Kyi were freed, she would be prevented from running for office because of her marriage to a foreigner, the late British academic, Michael Aris.

The daughter of Myanmar independence hero Aung San has spent 14 of the last 20 years in some form of detention at the behest of the military, which has ruled the former British colony for almost five decades.

Suu Kyi last week offered to help the junta to negotiate an end to crippling sanctions on the country, which critics say have been ineffective and have hurt the Burmese people rather than the generals.

Analysts say the notoriously paranoid generals see Suu Kyi as a threat because of the influence she has over the Burmese people and the international community and will likely reject her offer of help.

The United States Tuesday entered into dialogue with the Myanmar regime, but emphasized that the lifting of sanctions would be a mistake.

(Writing by Martin Petty; Editing by Jason Szep)