Two former senior Taylor, Bean & Whitaker Mortgage Corp executives were sentenced on Friday to several years in prison for their roles in a nearly $3 billion fraud that took down the big lender and a major bank.

The fraud ran more than seven years until August 2009 when TBW collapsed after the U.S. housing market imploded, taking Colonial BancGroup Inc's Colonial Bank with it and putting hundreds of people at the firm out of work.

Company and bank officials were accused of trying to cover up enormous losses by moving money between accounts at Colonial Bank and selling mortgage loans that did not exist, were worthless or already had been sold.

The Obama administration elicited guilty pleas from six senior executives. TBW's former chairman, Lee Farkas, was convicted by a jury in April on 14 counts of bank, securities and wire fraud as well as conspiracy.

They knew that without their fraud scheme, TBW would fail, said Neil MacBride, the U.S. attorney for eastern Virginia. They allowed Lee Farkas to control and manipulate them into doing what they knew was wrong, and now they will pay for their crimes.

It is one of the few cases in which prosecutors have been able to penetrate the executive suites of a major firm in the wake of the 2008 global financial crisis. Most prosecutions have involved lower-level employees or much smaller firms.

Desiree Brown, TBW's former treasurer, was sentenced by District Judge Leonie Brinkema to six years in prison after she tearfully acknowledged her wrongdoing. She pleaded to one count of conspiracy to commit bank, wire and securities fraud.

It was never my intent to commit a crime, she told the court. It was always my intent to fix the problem.

Prosecutor Patrick Stokes sought an eight-year sentence, telling the judge that Brown had a substantial role in the fraud and that she had been blinded by her loyalty to Mr. Farkas.

Her attorney urged a lesser sentence, suggesting five years and noting that she was just a country girl from Nebraska with a high school education. She started as a receptionist before working her way up in the company.

Brinkema also sentenced TBW's former president, Raymond Bowman, to 30 months in prison. He had pleaded guilty to a conspiracy fraud charge as well as for lying to investigators when they raided the mortgage firm two years ago.

Prosecutors had sought five years in prison.

Brinkema gave lower sentences than sought by prosecutors. One prosecutor, Charles Connolly, urged the stiff penalties be imposed because there needs to be a message sent to the Street that the conduct was unacceptable.

However, the judge said the two were unlikely to commit crimes again, noted their cooperation and said that they were likely decent people. However, she said it was a massive fraud and the sentences would serve as a deterrent to others.

Connolly told the judge that the TBW investigation was ongoing. Farkas is due to be sentenced on June 27.

Before its collapse, TBW was one of the country's largest privately-held mortgage lenders, doing some $20 billion in mortgage sales a year, and Colonial Bank was one of the top 50 U.S. banks before regulators took it over.

Authorities have estimated the fraud at nearly $3 billion. The executives were also accused of misappropriating money from one of its own funding mechanisms which had two big investors, Deutsche Bank AG and BNP Paribas SA .

As losses mounted at TBW, the firm tried to drum up capital to help Colonial Bank win $553 million in funding from the federal bank bailout program known as the Troubled Asset Relief Program, prosecutors said. No money was disbursed.

The cases are: USA v. Bowman, No. 11-cr-118 and USA v. Brown, No. 11-cr-84 in U.S. District Court for the Eastern District of Virginia.

(Editing by Robert MacMillan)