Burmese pro-democracy leader Aung San Suu Kyi won a seat in parliament Sunday, as her National League for Democracy claimed a near-sweep in historic by-elections that will test Myanmar's reform credentials and could convince the West to end sanctions.

NLD officials said they were confident of winning 40 of the 45 seats at stake, the Christian Science Monitor reported. If confirmed, the results would deal a major blow to the credibility of the military-backed Union Solidarity Development Party, which has dominated parliament since flawed elections in 2010 that the NLD boycotted.

I am very happy for democracy and for the future of our country, said NLD spokesman Nyan Win, as thousands of supporters, many clad in red T-shirts emblazoned with their party's golden peacock emblem, danced and clapped in the streets of Yangon to the sounds of party songs blaring from loudspeakers.

Neither the government, nor the USDP, had made any statement by late Sunday evening. Official results are not expected until later in the week, but the NLD said it based its claims on vote counts from individual constituencies reported by the media and party representatives at local vote-counting centers.

The unexpected scale of the opposition's apparent victory -- matching its triumph in elections in 1990 that the military junta then in power chose to ignore -- is likely to unnerve the government, mainly comprising former Army generals, that had hoped to control the pace of political reform, local and foreign analysts suggested.

What is important from now on is that all the parties to the reform process work closely together, one Western diplomat told the Monitor.

The NLD should be very careful not to be arrogant or aggressive, says Myo Nan Naung Thein, a former political prisoner and sometime aide to Suu Kyi. If we are seen as a threat to the government there is a possibility that the [reform] process will slowdown or fail later on, he warns.

The NLD did caution its supporters on Sunday evening to temper their euphoria.

Celebrations and enjoyment are natural, the party said in a statement. But we must completely avoid doing or saying anything that might hurt people from other organizations. All NLD members must take care that the victory of the people bolsters the reputation of the people.

Hundreds of people cheered and shouted when a large screen outside the NLD offices announced a victory estimated unofficially at 82 percent of the vote for the pro-democracy icon, the Los Angeles Times reported.

The United States and European Union have hinted that some sanctions -- imposed over the past two decades in response to human rights abuses -- may be lifted if the election is free and fair, unleashing a wave of investment in the impoverished but resource-rich country bordering rising powers India and China.

The European Union hinted that it could ease some sanctions if the vote went smoothly.

We hope the whole day can be run in a peaceful way and we'll make an evaluation later on the basis of all the polling sessions that we will be seeing, EU observer Ivo Belet told the BBC.

The NLD alleged some voting irregularities in the new capital, Naypyidaw.

A NLD spokesman told Agence France-Presse he had sent a letter to the election commission complaining that ballot forms had been tampered with.

Nyan Win said there had been complaints that wax had been put over the check box for the party, which could later be rubbed off to cancel the vote.

This is happening around the country. The election commission is responsible for what is occurring, he said.

The charismatic and wildly popular Suu Kyi had complained last week of irregularities, but none significant enough to derail her party's bid for 44 of the seats. She made no immediate comment on her victory.

Suu Kyi and the NLD have taken no part in Burma's political process since 1990, when the NLD won a landslide victory in a general election but the military refused to accept the result.

From dawn, voters quietly filed into polling stations at schools, religious centers and community buildings, some gushing with excitement after casting ballots for the frail Suu Kyi, or Aunty Suu as she is affectionately known.

Among her supporters who voted early Sunday in Suu Kyi's rustic constituency of bamboo-thatched homes in Kawhmu, there was little doubt she would win. My whole family voted for her and I am sure all relatives and friends of us will vote for her too, said Naw Ohn Kyi, 59, a farmer from Warthinkha.

So far as my friends and I have checked, almost everyone we asked voted for Aunty Suu, added Ko Myint Aung, 27-year shop owner from Kawhmu.

To be regarded as credible, the vote needs the blessing of Suu Kyi, who was freed from house arrest in November 2010, six days after a widely criticized general election that paved the way for the end of 49 years of direct army rule and the opening of a parliament stacked with retired and serving military.

President Thein Sein, a general in the former military junta, has surprised the world with the most dramatic political reforms since the military took power in a 1962 coup in the former British colony then known as Burma.

In the span of a year, the government has freed hundreds of political prisoners, held peace talks with ethnic rebels, relaxed strict media censorship, allowed trade unions, and showed signs of pulling back from the powerful economic and political orbit of its giant neighbor China.

It was rewarded last November when Hillary Clinton made the first visit to the country by a U.S. secretary of state since 1955. Business executives, mostly from Asia but many from Europe, have swarmed to Yangon in recent weeks to hunt for investment opportunities in the country of 60 million people, one of the last frontier markets in Asia.

Voting took place under the watch of small numbers of observers from the European Union and the Association of South East Asian Nations, who were given only a few days to prepare inside Myanmar. Some said they considered themselves election watchers rather than observers.

Whatever irregularities we saw in the polling stations we visited did not seem to be out of bad will or intentions, EU delegate Malgorzata Wasilewska told Reuters. It was more lack of experience or knowledge.

She stressed, however, that the EU had only visited a small number of polling stations and that irregularities could still occur in the counting process.

The last election, in November 2010, was widely seen as rigged to favor the military-backed Union Solidarity and Development Party, the biggest in parliament.

The NLD boycotted that vote. But as Myanmar changes, so too, has Suu Kyi. At 66, many see her now as more politically astute, more realistic and compromising. She has described President Thein Sein as honest and sincere and accepted his appeal for the NLD to take part.

Her top priorities, she says, are introducing the rule of law, ending long-simmering ethnic insurgencies and amending the 2008 constitution ensuring the military retains a political stake and its strong influence over the country.

While her party may end up with only a small number of seats, many expect her to exert outsized influence.

Some Burmese wonder if conservatives would dare oppose her ideas in parliament given her popularity, especially ahead of a general election in 2015. Many MPs want to be seen aligned with her, sharing some of her popular support.

Activists welcomed Suu Kyi's victory but cautioned that this was only a first step. Aung Myo Thein, an official with the Assistance Association for Political Prisoners, a Thailand-based group fighting for the release of detainees, said it remained to be seen how effective she would be in parliament opposing government policies.

The election has not gone smoothly. Suu Kyi has suffered from ill health and accused rivals of vandalizing NLD posters, padding electoral registers and many cases of intimidation.

Some of these infractions, however, have been quite minor and are typical of elections across Southeast Asia, where vote-buying and even assassinations are commonplace.

Skeptics in the democracy movement say Suu Kyi is working too closely with a government stacked with the same former generals who persecuted dissidents, fearing she is being exploited to convince the West to end sanctions and make the legislature appear effective. Others have almost impossibly high hopes for her to accelerate reforms once she enters parliament.

Too many expectations are dangerous, says Ko Ko Gyi, a former political prisoner and Suu Kyi loyalist. She is not a magician.

It was not clear when the election results would be officially announced. The full result has been promised within one week.

Some U.S. restrictions such as visa bans and asset freezes could be lifted quickly if the election goes smoothly, diplomats say, while the EU may end its ban on investment in timber and the mining of gemstones and metals.

(Writing by Martin Petty; Editing by Jason Szep and Jonathan Thatcher)