To feed her habit she abused her position as a purchase ledger clerk at Pembroke College for 18 months.

Married Balaam - who had admitted her guilt - sobbed and shook as Cambridge Crown Court heard of her greed.

Sara Walker, prosecuting, said she started working for the college in October 2009 but it wasn't until June 2012 that she started to duplicate invoices and pay money into her account.

She was in charge of paying suppliers who provided goods and services to the college and paid them using the BCAS system on a weekly basis.

Over 18 months she duplicated 77 invoices and targeted the suppliers who paid the college the most frequently.

By the end of the fraud she was making payments into her account four times a week.

She would then go back into the accounting system and change the details back to those of the supplier to cover her tracks and make sure they were still paid.

The college uncovered her crime during an internal audit in January 2014 and found she had stolen £285,986.18.

Police were called and found that Balaam had also stolen more than £3,000 over four years from Girton Social Club in Cambridgeshire where she volunteered as treasurer.

Balaam, whose husband was in court, took an overdose on the day she was arrested but recovered after hospital treatment.

She told officers she was addicted to the Jackpotjoy which describes itself as the UK's biggest online bingo site.

Ms Walker said: "She told the police that she had a gambling condition and that she played online on a laptop given to her by the social club."

Balaam, from Cambridge, admitted falsifying invoices at the college to obtain a total of £285,986.18 between June 2012 and January 2014.

She also pleaded guilty to defrauding Girton Social Club between December 2010 and January 2014.

And she also admitted one charge of false accounting by creating two financial statements pretending they had been produced by Staffords Chartered Accounts.

Judge Gareth Hawkesworth sentenced her to 30 months behind bars and said she had made no attempt to seek help.

Jacqueline Balaam has been jailed for two and a half years (Cambridgeshire Police/PA)

He said: "You seemed to cover your tracks with some skill in the way you manipulated your records.

"It is clear that your taking of this money was prompted by an addiction and it is equally clear that such was your addiction that you made no real profit from it and no money was spent for the benefit of your family.

"I cannot suspend the sentence because of the sheer scale of what you did and the length of time which you proceeded with it.

"You are an intelligent woman and you were well able to seek help during that period and you did not do so."

Mark Shelley, mitigating, said Balaam had been a "trusted member of the college" who was led astray by her addiction.

He said: "She must have spent a lot of time on this addiction and she knew she was losing everything.

"There is no expensive holidays or cars or anything like that. It was all spent on gambling.

"Her reason for her offending was an illness. It wasn't greed, it was simply gambling and she has taken steps to address her problem."

Mr Shelley added that she had made "real efforts" to tackle her addiction since her arrest.

No orders were made to retrieve the stolen money but the court heard there would be a proceeds of crime hearing to set the amount of compensation.

Balaam was suspended after her arrest in January and later dismissed from her role as finance officer.

Pembroke College, founded in 1347, is the third oldest at Cambridge and includes William Pitt the Younger - the youngest ever British Prime Minister - among its alumni.

Master of Pembroke College Sir Richard Dearlove was formerly chief of M16 during the Iraq War.

Pembroke College said Balaam's actions had "miserable human consequences".

A spokesman said: "Now that the circumstances are not in dispute we would like to express our regret and sadness about this incident, which had miserable human consequences.

"The College's losses were significantly covered by insurance and we are vigorously pursuing the recovery of the remaining losses.

"After an external review, changes have been implemented to our accounting processes so as to prevent such an eventuality occurring again."