A gang of lawyers conspired to scam the taxpayer out of millions of pounds in legal aid payments, a court heard.

Barrister Shahid Rashid, 59, together with solicitors Razi Shah, 49, and husband and wife Rasib Ghaffar, 50, and Kareena Maciel, 47, are said to have falsely claimed £1,856,584 in costs for a Bournemouth Crown Court trial in 2011.

Also accused in the conspiracy are solicitors Azhar Khan, 48, Joseph Ameyaw-Kyeremeh, 69, and legal clerk Gazi Khan, 49.

Azhar Khan and Gazi Khan are further accused of fraudulently claiming nearly £9 million in legal aid relating to two 2012 trials at the Old Bailey and Isleworth Crown Court.

Civil judge Razi Shah and Joseph Ameyaw-Kyeremeh at Southwark Crown Court on Thursday

Southwark Crown Court heard that the group managed to successfully claim £469,477 of public money in the first conspiracy.

Prosecutor John McGuinness told the jury that while most crown court defendants use legal aid, some of them pay privately for their defence.

But if the defendant who is privately represented is cleared of the charges, they are entitled to claim back their costs through a defendant's cost order.

'The three counts we are going to be considering are all about claims that were made because there was an existence in the case of a defendant's cost order,' he said.

'If there is an acquittal of the privately paying client at the crown court, at the end what happens is that the advocate asks the judge to grant the defendant, that he has been representing, a defendant's cost order which enables the acquitted defendant to apply for his or hers legal costs to be reimbursed to them.

Rasib Ghaffar outside Southwark Crown Court on Thursday

'What happens is that the money comes from public money, of what are known as 'central funds',' said Mr McGuiness.

'For each of those claims a determining officer is appointed to look at the claims to assess what work had actually and reasonably been done and they decide how much to pay out.'

The court heard that Mohammed Faruk Miah and Mohammed Chunu Miah were on trial for employing illegal immigrants in their two restaurants in Bournemouth and Poole and money laundering charges related to that.

They were part of a case involving six defendants, namely two of their brothers and a company and partnership they owned.

'A deal was done between the prosecution and the defence.

'Two of the brothers pleaded guilty to certain charges against them brought against them and the prosecution was content with the pleas of guilty from the other two brothers.

'As a result, the prosecution agreed it would not proceed to trial against the two brothers named in the indictment and against the partnership and the company,' said Mr McGuinness.

'The prosecution effectively dropped the case against the other four.

'The other four said that they were private claimants.

'Because we are private claimants not having the benefit of legal aid we are obligated to pay for our own legal costs.

'Following the acquittals they were each granted a defendant's cost order.'

Immigration judge Kareena Maciel (left) and Gazi Khan (right) outside Southwark Crown Court today

The court heard that the two brothers who pleaded guilty were on legal aid, but the acquitted brothers claimed they paid for their own defence and that of their company and partnership.

'When you look at the material, not only those two brothers had legal aid but Mohammed Faruk Miah and Mohammed Chunu Miah also had legal aid authority was asked to withdraw or revoke the legal aid.

'As the result of it being taken away they switched to being private claimants,' said the prosecutor.

'The prosecution's case is that happened because effectively resulted in a deal and those who were involved, all seven defendants, effectively put their heads together to make those false claims for reimbursement of private costs that had not actually been incurred.'

The court heard that a similar false claim was made by the two Khans relating to the case of Amy Trihn in front of the Old Bailey.

'She was also a defendant who had the benefit of legal aid in those criminal proceedings but she switched from being a legal aid claimant to being a private claimant and therefore, the prosecution say, a false claim had been made on her behalf,' he added.

Jurors heard that in the Isleworth case of Jason Stewart, the defendant was in fact genuinely paying for his own costs.

But instead of claiming the £16,000 that Mr Stewart had paid his legal team, after his acquittal, the Khans tried to claim around £159,000 instead.

Defence work claimed for in the Miah crown court case was 'falsely backdated' and included periods where no work could have happened, the court heard.

Rashid's clerk Gazi Khan, also acted as costs draftsman, namely being responsible for drafting legal aid payment claims.

One of the legal service providers he is said to have made claims from is Farah Flores Associates, which is run by his Martha Khan.

Two of the four solicitor firms that that allegedly made false claims, in which Razi Shah was the principle partner received £260,000 despite only entering the case seven days before it was concluded.

One of the defendants in the Bournemouth trial had been granted legal aid on 6 July 2011 despite being billed over £300,000 by Ameyaw-Kyeremeh's firm alone, the court heart.

But that legal aid was withdrawn following his request just a month later.

'Some time around about the end of August it would appear that Chunuh Miah, or somebody on his behalf, has asked that his legal aid be withdrawn,' said Mr McGuinness.

'It doesn't make sense if you are a defendant in criminal proceedings to give up the benefit of a legal aid order in order to pay a much higher sum.'

The court heard that the defendant's brother had similarly asked for his legal aid to be withdrawn.

Their lawyers are said to even have claimed costs for the period when the legal aid had been in place.

Mr McGuinness added that the only possible reason was a 'dishonest' one, relating to the four defendants' acquittal on the 9 September that year.

He added that the co-conspirators 'knew the score' and the fact a deal was about to happen allowing them to claim back the costs of privately represented defendants.

Jurors were told that legal aid claims are assessed by a public body called the National Taxing Team made up of determining officers.

But the defendants' claims came under scrutiny when the officer noticed that they were for very large amounts without breaking down the type of work being claimed.

Gazi Khan, from Isleworth, Azar Khan, from Pinner, Middlesex, Ameyaw-Kyeremeh, from Croydon, Ghaffar and Maciel, from Malford Grove, east London, Rashid, from Langley, Berkshire and Shah, from Windsor, all deny conspiracy to commit fraud by false representation.

Gazi Khan and Azhar Khan deny two further counts of fraud.

The trial continues.