An HM Revenue and Customs worker fraudulently claimed £65,000 in benefits by pretending to be a single mother, a court heard.
Nicola Farningham was employed as a tax credits advisor in HMRC's Dundee call centre advising the public about child and working tax credits.
The mother-of-four claimed she was living alone with her children and only earning up to £15,000 a year. But in reality she was living with her husband Paul at their home in the city.
Dundee Sheriff Court was told that none of the money had been repaid.
Depute fiscal Eilidh Robertson told the court that an HMRC investigation was launched in 2014 following a tip-off.
Miss Robertson said Farningham submitted forms saying she was single from 2005 onwards and that her income varied from £7,253 to £15,111 over the period of the nine-year fraud.
She said: "The investigation into the accused established that she had married Paul Farningham on 7 September 2007 and that they had four children together. The accused and Mr Farningham had shared a joint bank account since 2004 and a joint mortgage for their property which they bought together in 2005."
Investigators interviewed Farningham's colleagues, who told them that she had told them she was married and that her husband stayed in Aberdeen during the week but was home at weekends.
Mr Farningham was observed coming and going from the accused's home, letting himself in with a key on one occasion.
Investigators found his wage slips at the house, as well as Valentine's cards between the couple. Miss Robertson said: "Text messages recovered simply demonstrated that the accused and Mr Farningham were in a relationship given the romantic nature of the texts. When she was interviewed the accused said they had not been co-habiting at any stage despite buying a property and having four children."
Farningham, 39, of Dundee, admitted a charge under the Tax Credits Act committed between 15 May, 2005 and 14 July, 2014. Sheriff Alastair Carmichael deferred sentence until March and released Farningham on bail.