The convictions of two asylum seekers jailed over riots at the Nauru immigration detention centre have been overturned after the Nauruan Court of Appeal identified serious flaws in the investigation and original trial.

In a scathing judgement, the court said the magistrate in the original trial failed to take into account serious flaws in the identification of the two men and also made "very prejudicial" comments that appeared to suggest there was an onus on the two men to disprove their guilt.

The court also said it was concerned Wilson Security appeared to have carried out the investigation that led to the men being charged, rather than the correct authority - the Nauruan Police Force (NPF).

The actions of Wilson personnel on Nauru are currently under strong scrutiny as a result of evidence given before Senate committee hearings.

The first man was convicted of unlawful assembly and rioting, and the second of rioting, over the July 2013 protests at the detention centre, which caused $60 million worth of damage. A third man was acquitted.

Do you know more about this story? Email investigations@abc.net.au

In convicting them last year, Magistrate Ropate Cabealawa described their conduct as "abhorrent" and said he needed to send a strong message that it would not be tolerated.

The first man was sentenced to two-and-a-half years in prison, and the second to a year.

Magistrate's interpretation of evidence unsubstantiated: appeal judgement

However, the Court of Appeal — comprising an Australian judge, a Fijian and a Pakistani — said the evidence given by Wilson Security guards identifying the two men should be treated with caution and that the magistrate should have taken this into account.

The Wilson guard who gave evidence that led to the first man — named as A1 — being convicted of rioting did not mention the man in two statements he made to police after the riots.

"No reason was given to the court as to why the statement given to police omitted any reference to A1," the judgement said.

Accommodation blocks were destroyed during the riots. ( Supplied: Department of Immigration and Citizenship )

The second man — described as A2 — was also convicted on the evidence of a Wilson guard, who claimed to have seen him grabbing another officer by the arm and trying to assault him.

However, in court, the Wilson guard gave a name for the asylum seeker he saw grabbing his colleague, which did not correspond to A2's name. The transcript of the original hearing also said the guard "identifies the 4th accused", despite there only being three men on trial.

"So the question that we have to ask is 'who was identified in Court?'" the appeal judgement said.

In the original judgement, the magistrate also claimed that the Wilson guard had seen A2 holding a large rock.

"Having considered the transcript of the trial, sentence, judgment and counsel submissions, with respect to the learned magistrate, his interpretation of the evidence are [sic] unsubstantiated," the appeal judgement said.

"With respect, the witness did not identify A2 as the one holding a stone, nor was A2 identified by having a torch shone in his face. Before the learned magistrate came to consider the evidence of identification he had already made a finding against A2 that he had acted in a tumultuous manner."

Onus of proof on defendants: judges

In addition to the questions about identification, the appeals court said the magistrate made comments that appeared to suggest it was up to the two men to disprove the charges accusations against them.

"In making these comments, it is our view that the learned magistrate was inferring that there was some onus on the appellants to disprove their guilt," the judgement said.

"These comments are very prejudicial and amount to an impermissible breach."

The appeals court judges also expressed concern at the way the investigation appeared to have been carried out by Wilson, with minimum input from the Nauruan police.

Other asylum seekers charged are believed to have received more lenient sentences than A1 and A2. ( ABC News: Craig Berkman )

"The court wishes it to be noted that the information placed before it in relation to the investigative processes in this case display, in all the circumstances, a concerning paucity of observance of recognised due process and lack procedural fairness," the judgement said.

"The investigative authority in this country is the NPF which, if lacking in resources in certain circumstances, may be bolstered by outside assistance without having its statutory-based role compromised."

A1 served 130 days in prison on Nauru before being bailed, while A2 was imprisoned for 226 days before the appeals court ordered him be freed.

Dozens of other detainees were charged over their roles in the riots, but their cases were heard by a different magistrate.

It is believed that many of them pleaded guilty to offences, and were given substantially more lenient sentences than A1 and A2.

Both men arrived on Nauru before July 2013, when the Federal Government declared any asylum seekers who arrived by boat would no longer be permitted to come to Australia.

As such, it is possible they might have been eligible for resettlement in Australia, but it is unknown what effect their original convictions might have had on that process. Their current whereabouts is unknown.