Lesotho's Deputy Prime Minister Mothet Joa Metsing says he has been invited to South Africa for talks after an alleged coup sent the country's prime minister fleeing to the same country.

"It is through the invitation of the South African president," Metsing told the AFP news agency about the planned meeting, adding that he did not have information about the agenda nor who else would attend.

Metsing has taken charge of the government after Prime Minister Thomas Thabane fled the country, accusing the army of staging a coup, a minister said on Sunday, according to the Reuters news agency.

Regional power South Africa condemned the army's actions and invited the deputy prime minister to talks there, Lesotho's Minister of Communications, Science and Technology, Selibe Mochoboroane, told Reuters. He did not specify who the talks would be with.

Thabane, who has been in a fractious coalition government with his political rival Metsing, left for South Africa on Saturday after the army surrounded his residence and police stations in Lesotho's capital, Maseru, and gunshots rang out.

One policeman was shot dead and four others were wounded during the confrontation, said police senior superintendent Mofokeng Kolo, according to Reuters.

Prime Minister Thabane told Al Jazeera on Saturday that the army was "all over the streets," and had taken control of government buildings and key installations before he managed to escape. He added that he suspected Metsing was involved.

Military denies claims

The army denied trying to force the prime minister out of power, saying it had moved against police officers suspected of planning to arm a political faction in the small southern African kingdom.

Metsing also denied a coup. "I would not still be a deputy prime minister; the prime minister would not still be the prime minister if a coup [had] taken place," he told Al Jazeera on Saturday.

Diplomats in Maseru told the Reuters news agency on Saturday that the army was largely seen as loyal to the deputy prime minister, while the police force largely supported the prime minister.

Since its independence from Britain in 1966, Lesotho has undergone a number of military coups. In 1998 at least 58 locals and eight South African soldiers died during a political standoff and subsequent fighting.

The landlocked country's first coalition government was formed in 2012 after elections ousted the 14-year incumbent Pakalitha Mosisili.