BISSAU, GUINEA-BISSAU — The president of Guinea-Bissau reassured the West African nation from his bullet-scarred home after mutinous soldiers fought their way into the residence today in a three-hour gunbattle with his guards.

In an apparent coup attempt, the soldiers attacked President Joao Bernardo Vieira’s home with heavy artillery fire shortly after midnight, killing at least one of his guards and injuring several others before security forces were able to push them back, Interior Minister Cipriano Cassama said earlier. The attackers did not reach the room where Vieira was hiding and neither he nor his wife was hurt, Cassama said.

“These people attacked my residence with a single objective — to physically liquidate me,” Vieira told the nation in a late afternoon televised news conference. “No one has the right to massacre the people of Guinea-Bissau in order to steal power by means of the gun.” The walls of his fortified house were scarred with bullets, and its floors still were littered with shell casings.

But calm appeared to have returned the capital, Bissau, and Vieira assured citizens that “the situation is under control.” Guinea-Bissau has had multiple coups and attempted coups since 1980, when Vieira himself first took power in one.

The U.N. says impoverished Guinea-Bissau, on the Atlantic coast of Africa, is a key transit point for cocaine smuggled from Latin America to Europe. In parliamentary elections held a week ago, opposition leader and former President Kumba Yala accused Vieira of being the country’s top drug trafficker. The president did not comment on the accusation.

“The troops will stay at the border until we are sure the situation has stabilized,” Sall said.

The African Union quickly condemned the attack.

The AU rejects “any unconstitutional change of government and condemns in advance any attempt to seize power by force,” AU commission chairman Jean Ping said in a statement.

Guinea-Bissau, a former Portuguese colony, has a history of coups and misrule. Vieira initially seized power in a 1980 coup. He was pushed out in 1998 during a brief civil war. In 2000, Yala won the presidential election, ruling until 2003, when he was forced from power in a coup. Vieira won the 2005 presidential election and has ruled since then.

Yala’s party lost seven seats in the 100-seat legislature in last week’s election.

The African Party for the Independence of Guinea-Bissau and Cap Verde, or PAIGC, went from 45 seats to 67, becoming the ruling party.

A 7-month-old party allied with Vieira won only three deputies.

Vieira himself used to belong to the PAIGC, but cut his ties with them following his 1998 fall from power.

Shola Omoregie, the U.N. Secretary-General’s representative in Guinea-Bissau told reporters that the international community condemns the attack, saying: “It’s unacceptable that after legitimate elections they could attack the president and try to kill him.” His comments were echoed by Carlos Gomes Jr, a former prime minister who now heads the majority party: “It’s unacceptable in the 21st century to resolve our problems with violence.”