Imagine being in the comfort of your own home, unaware you would soon be wrongfully accused of a brutal home invasion. See how a Sydney finance broker fought his wrongful prosecution.

Imagine being in the comfort of your own home, blissfully unaware you would soon be wrongfully accused of a brutal home invasion, 10 km away, which saw two residents maliciously assaulted by their attackers.

That was the reality for Edward McPhee, a 31-year-old Sydney finance worker whose life came tumbling down, after a single fingerprint, left at least six months before when his friends occupied the house, resulted in him being wrongly arrested in Coogee seven days later.

He was later charged with two counts of aggravated break and enter and commit serious indictable offence before being refused police bail.

A magistrate ultimately granted his release on strict conditions and he spent almost three months with a 20-year maximum jail sentence, if found guilty, weighing over his head.

NSW Police wrongfully alleged to the court Mr McPhee and another man forced entry into a Glebe home and assaulted two victims, who sustained cuts, swelling, and bruising.

Police later established a crime scene at the home with a forensic examination looking for DNA and fingerprints – which police allege resulted in Mr McPhee being identified.

Mr McPhee was arrested at his home in Coogee on May 18 and he was taken to Maroubra police station.

Throughout the court process, Mr McPhee’s high-profile legal team, including barrister Daniel Grippi and instructing solicitor Sophie Newham, worked around the clock to have the matter eventually thrown out in July last year.

It culminated in a costs hearing at Downing Centre Local Court on Thursday where Mr Grippi told the court an alibi was already established by his team from the outset, despite the police arguing the evidence against Mr McPhee was strong.

He said police were put “squarely on notice” there was an issue with identification, given his client’s phone was placed at a different location during the offence.

After Mr McPhee’s house was ransacked by police, Mr Grippi said nothing was found matching the high-vis clothing worn by the two attackers and it was “fundamentally obvious [police] were … going down the wrong path”.

He argued that any view of the defence bundle would lead to the “inevitable conclusion that this case is doomed to fail”.

“It’s patently clear … police had a description [of the attackers] that didn’t match [my client] and this very … narrow fingerprint,” Mr Gripp said.

“It simply illustrates the way in which police investigated and single-mindedly focused on a fingerprint … it’s as simple as that.”

Mr McPhee was ultimately awarded $31,988 in costs as Magistrate Jennifer Atkinson found NSW Police shouldn’t have charged him for the crime.

“Really there is only one bit of evidence … [and] while investigations do continue … police had a fair bit of evidence and none of that was connecting to Mr McPhee,” she said.

In a statement, a Murphy’s Lawyers representative said this was a “hasty, ill considered and wrongful prosecution”.

“No thought was given to the effect this had on our client. Police should think twice – or at all – before charging and refusing bail for an innocent person.”