HOUSTON – The first assistant treasurer of Harris County is accused of stealing more than $35,000 from a credit union to pay off a dominatrix who was blackmailing him.

Court documents showed that Gregory Lueb, 56, was charged with aggregate theft of up to $30,000. He made his initial court appearance early Friday and bonded out of jail hours later.

VIDEO: Harris County assistant treasurer accused of stealing $35K bonds out of jail

According to court records, Lueb opened a credit line of $10,000 at the Harris County Federal Credit Union and began making cash advances against the credit. Lueb then used fraudulent transactions to make payments on the credit account, according to the records. However, before the payments were returned, the corresponding amount was made available on the credit account, allowing Lueb to make even more cash advances on the credit line, according to the records.

All of the cash advances were made between September and November of 2016, according to court records. With interest and fees, a total of $42,183.82 was owed on the account, according to the records.

According to court records, Lueb broke down during his interview with investigators and said that the money was being used to pay off a woman, called "Mistress Cindy," who he met on the sadomasochism website CollarSpace.com. Lueb said that his mistress began demanding more and more money and eventually threatened to tell his wife about their affair if she was not paid.

Harris County District Attorney Kim Ogg said Lueb worked as the second in command at county’s treasury. Ogg said Lueb was fired Thursday and called on county commissioners to order an independent audit of every account he handled.

"We are sounding the alarm," Ogg said. "Lueb had extraordinary access to the taxpayer dollars of every agency, and this case strongly suggests the need for an independent audit of every account he touched."

Ogg said the charge Lueb was facing was filed because they have clear evidence of the amount needed to file that charge.

"Everything can change, depending on what the rest of the of the investigation reveals," Ogg said. "We thought it was important to get him off the streets, ask him to surrender his passport, and go ahead and start with this case."

Lueb is being held at the Harris County Jail, prosecutors said.

If convicted, Lueb faces up to two years in prison.

Harris County Treasurer Orlando Sanchez said that a statement made by Ogg about Lueb's ability to move money was incorrect. He said that not one penny of county money is moved without at least four signatures and approval from county commissioners.

VIDEO: Prosecutors discuss case