Hundreds of ethnic rebels have fled clashes in northeastern Burma, surrendering their weapons and uniforms to Chinese border police and crossing to safety after several days of skirmishes with Burma government troops.

Burma's military junta ended a news blackout about the clashes Sunday, saying three days of fighting had killed 26 government forces and at least eight rebels. It said the fighting had ended and "the region has now regained stability."

The United Nations and Chinese officials say up to 30,000 civilian refugees have streamed into China to escape the fighting, which broke out last week after hundreds of Burmese soldiers moved into Kokang, a mostly ethnic Chinese region run by a local militia.

Burma's junta is trying to consolidate control over several armed ethnic groups along its borders to ensure next year's national elections, the first in nearly 20 years, go smoothly.

A U.S.-based Burma watchdog group said Sunday that most of the Kokang rebels had surrendered their arms to Chinese authorities upon entering the country, but it was not clear whether their leader was among them. They also gave over their green uniforms in exchange for blue cotton tops and pants.

"There was no way we would win," said one former rebel, Ri Chenchuan, as he shopped for new clothes in the few shops of Meng Peng, a mountain town about 12 miles (20 kilometers) from the border. Several former rebels said they arrived Saturday and slept in the open-air vegetable market.

The clashes have strained China's close relationship with Burma's military junta and come at a particularly sensitive time — ahead of Oct. 1 celebrations to mark 60 years of communist rule.

Beijing has asked Burma to end the fighting.

A government announcement read aloud Sunday evening on state-run TV news broadcasts in Burma said the fighting was over but had killed 26 junta soldiers and police and left 47 wounded. It said eight bodies of Kokang rebels were found and 600 pieces of weapons seized.

There was no way to independently verify the figures.

The announcement said fighting had started Thursday and ended Saturday. TV news showed still photographs of police corpses and Kokang people fleeing.

"The region has now regained stability. Kokang ethnic people who have returned to their homes are being accepted back after scrutiny," said the announcement, which was signed by "Office of the Government of Myanmar."

An official with the Public Security Bureau in China's Zhenkang county, which oversees the border area, said Sunday there had been no reports of fighting since late Saturday. Like many Chinese officials, he refused to give his name.

In Meng Peng, several men told The Associated Press they had turned in their weapons to Chinese officials. Dozens of the men wearing blue cotton pants and shirts, issued to them when they surrendered their green rebel uniforms, were seen shopping for civilian clothes.

Li Jiayun said he and others decided to retreat "so that more civilians didn't get hurt."

The Kokang are an ethnic Han Chinese minority group that speaks Chinese and, according to exiled Burma rights activists, has received support for decades from China because of its traditional ties to the Communist Party.

The Washington-based U.S. Campaign for Burma said about 700 rebels from the Kokang ethnic minority's militia had fled from thousands of Burmese troops into China late Saturday, but tensions remained high.

"The majority of the Kokang troops have surrendered to China," said Aung Din, the campaign's executive director. There were conflicting accounts of whether militia leader Peng Jiashen was among them, he said.

But Burma's junta is expected to target other ethnic minorities along the border, Aung Din said. Several armed ethnic groups along the border with China are resisting pressure from the junta to join with the military to become border guards ahead of next year's elections.

"There will be more fighting, more tension and more conflict because the regime will continue to try to force these groups to surrender their arms," Aung Din said.

According to the junta's announcement Sunday, tension started in the area on Aug. 8 when authorities seized a Kokang weapons factory and summoned four rebel leaders who then fled into hiding.

On Thursday, Kokang troops then raided a police post at a border checkpoint and took 39 police hostage, the junta said.

"Fighting ensued when Kokang troops began firing at Myanmar troops but fighting stopped Aug. 29," the announcement said, adding that the junta holds the four leaders responsible for the fighting. It did not elaborate.

The conflict area is on the fringe of the drug-producing Golden Triangle region where Burma, Thailand and Laos meet. Many of the ethnic armies there have used the drug trade to finance their operations. The Kokang and neighboring Wa regions, both isolated by mountainous terrain and a lack of roads, were traditionally Burma's main poppy growing areas.

Burma, also known as Myanmar, is the second largest exporter of heroin after Afghanistan.

The U.N. High Commissioner for Refugees said up to 30,000 people have poured into the Chinese border town of Nansan from Kokang since early this month. Chinese authorities are providing emergency food, shelter and medical care, it said.

The official People's Daily newspaper quoted Yunnan provincial police chief Meng Sutie as confirming the 30,000 figure during a press conference Sunday. The report also said China's Public Security Minister Meng Jianzhu visited the border area recently to see how the massive influx of refugees was being handled, but it gave no specifics.

Hundreds of refugees could be seen milling around Nansan on Sunday. Many hiked or drove up to a popular tourist spot to take photos of the heavily guarded border crossing.

The refugee camps, however, were off limits to foreign reporters. Li Hui, a local Foreign Affairs Department official, told AP reporters that media were not allowed in the settlement areas and ordered them to leave.