Ghanaian soldiers intervened in parliament to quell a clash between opposing parties in chaotic scenes overnight ahead of the body's swearing-in on Thursday.

Mayhem erupted after a lawmaker from the ruling party tried to seize the ballot box during the vote for parliament speaker.

The mayhem erupted after a ruling party deputy tried to seize the ballot box during the vote for Ghana's parliament speaker
The mayhem erupted after a ruling party deputy tried to seize the ballot box during the vote for Ghana's parliament speaker AFP / Nipah Dennis

The ensuing clash lasted several hours until the army moved in, with national television broadcasting the drama live.

After order was restored, the legislature narrowly chose someone from opposition ranks to be speaker -- a first in Ghana's nearly 63-year post-independence history.

Despite the historic choice, many legislators said the chaos had cast a dark shadow.

The new parliament is due to be sworn in on Thursday
The new parliament is due to be sworn in on Thursday AFP / Nipah Dennis

"There was total breakdown of law and order," said Kwame Twumasi Ampofo of the opposition National Democratic Congress (NDC).

"Looking at a member of parliament and a minister of state snatching ballot papers... was so shameful."

The new parliament is split down the middle between the two main parties, posing the risk of gridlock on tackling Ghana's problems.

Ghana
Reuters

President Nana Akufo-Addo, who narrowly won re-election in the December 7 vote for the legislature and head of state, was also sworn in on Thursday but opposition deputies boycotted the event.

The opposition is contesting the election results in court.

Ghana stands out as a stable democracy in volatile West Africa and observers, both Ghanaian and foreign, viewed the polling as generally free and fair.

Tempers flare during the first session of Ghana's new parliament following elections on December 7. The body is split down the middle between the two main parties, posing the risk of gridlock on tackling Ghana's problems.
Tempers flare during the first session of Ghana's new parliament following elections on December 7. The body is split down the middle between the two main parties, posing the risk of gridlock on tackling Ghana's problems. AFPTV / Nipah DENNIS

However, the ballot was marked by opposition accusations of fraud and five people died in violence.

More than a dozen opposition MPs were charged with unlawful gathering on Monday after protesting the results.

Footage from the overnight confrontation in parliament showed some of the legislators shouting and brawling with rivals.

President Nana Akufo Addo was sworn in for a second term
President Nana Akufo Addo was sworn in for a second term AFP / Nipah Dennis

"This is history wrongly being made. We need to bow our heads in shame," said ABA Fuseini, another incoming opposition MP.

The NPP won 137 seats in the 275-member parliament, after shedding 32 in the election, leaving it equal to the 137 held by the NDC.

A lone independent won the remaining seat.

On Wednesday, an NDC MP was ordered suspended on legal grounds because he had dual nationality, which in theory brought the opposition's ranks down to 136.

However, he insisted on casting his vote on Thursday morning, a move that sparked further scuffles and chaos.

The ballot for speaker was won by the NDC's Alban Bagbin by 138 votes to 136 -- the outcome of one vote that was rejected as spoilt, and another that was probably cast in his favour by a member of the NPP.

It was the first time in Ghana's history, since independence from Britain in 1957, that a member of the opposition had been appointed to this key post.

"I humbly accept the high and privileged office," Bagbin said.

President Akufo-Addo, in his inauguration speech welcomed Bagbin's appointment but made no comment on the riotous scenes overnight.

"I am confident that we will both be guided by the supreme interest of the nation and that we will defend good governance for the affairs of the State," he said.

Opposition leader John Mahama, who came second in the presidential vote, called it a day of "infamy" for Ghanian democracy and demanded an enquiry into the running of the elections.

Analysts warned of the risk of legislative deadlock at a time when the nation of 30 million faces crunch decisions about its economy.

The government also faces the urgent task of reining in mounting debt, which surpassed 70 percent of GDP in September, and control rising inflation.