Political violence has been escalating in Burundi since April. Photo: AP
Burundi's President Pierre Nkurunziza has threatened to fight African Union (AU) peacekeepers if they are deployed to the country.
The AU announced two weeks ago that it would send 5,000 troops to protect civilians in the country, even without the government's consent.
"Everyone has to respect Burundi borders," Mr Nkurunziza said in his first public response to the AU plan. At least 400 people have been killed and 220,000 displaced since April.
The violence began after Mr Nkurunziza announced he would seek a third term in office. He survived a coup attempt in May, and secured a landslide victory in disputed elections in July.
There have been fears that the violence could spiral into civil war and possible ethnic conflict.
Under Burundi's constitution, foreign troops can only intervene if the warring parties ask for it, or if there is no legitimate government in place, the president said in comments broadcast on state radio.
Any violation of those principles would be considered "an attack on the country and every Burundian will stand up and fight against them," he said.
Other government officials have already criticised the AU proposal saying it would violate the country's sovereignty.
If the deployment goes ahead, it would be the first time the AU uses its power to deploy a force without a country's consent.
A clause in the organisation's charter allows it to intervene in a member state because of grave circumstances, which include war crimes, genocide and crimes against humanity.
Diplomatic moves to prevent a civil war in Burundi have recently accelerated with the UN, the European Union and the East African Community fearful of the impact of worsening violence both on the local population and the region.
The government has said there is no threat of genocide. A peace meeting held in neighbouring Uganda on Tuesday to find a solution to the crisis ended without any agreement.
A recent AU fact-finding mission reports of arbitrary killings, torture and the arbitrary... "closure of some civil society organisations and the media".
Ethnic conflict between Hutus and Tutsis in the 1990s claimed an estimated 300,000 lives. Mr Nkurunziza is the former leader of a Hutu rebel group, who has been in power since a 2005 peace deal.
Both the government and the opposition are ethnically mixed. Timeline - Burundi crisis April 2015 - Protests erupt after President Pierre Nkurunziza announces he will seek a third term in office. May 2015 - Constitutional court rules in favour of Mr Nkurunziza, amid reports of judges being intimidated. Tens of thousands flee violence amid protests. May 2015 - Army officers launch a coup attempt, which fails. July 2015 - Elections are held, with Mr Nkurunziza re-elected. The polls are disputed, with opposition leader Agathon Rwasa describing them as "a joke". November 2015 - Burundi government gives those opposing President Nkurunziza's third term five days to surrender their weapons ahead of a promised crackdown. November 2015 - UN warns it is less equipped to deal with violence in Burundi than it was for the Rwandan genocide. December 2015 - 87 people killed on one day as soldiers respond to an attack on military sites in Bujumbura