DALLAS — Dallas Mayor Pro Tem Dwaine Caraway accepted more than $450,000 in kickbacks and bribes, in part through a phony consulting agreement, gambling money and trips to Las Vegas and elsewhere, federal prosecutors said Thursday.

Caraway, the second highest-ranking elected official in Dallas, pleaded guilty to two federal charges in the public corruption case and has resigned from the Dallas City Council. Federal court records show he received kickback funds from Robert Leonard, president and owner of Force Multiplier Solutions, and Leonard's business associate.

U.S Attorney Erin Nealy Cox announced Thursday that a judge accepted the guilty pleas from Caraway and Leonard.

Cox said that Leonard, aided by his associate, paid a combined total of more than $3.5 million to Caraway and Rick Sorrells, former superintendent for Dallas County Schools, in return for favorable action related to Force Multiplier Solutions, a technology company that puts cameras on school buses.

The effort, she said, helped the company and Leonard secure more than $70 million in contracts and agreements with Dallas County Schools, the troubled agency which residents last year voted to dissolve. The organization had provided transportation for thousands of students.

"An entire public entity relied upon by parents and school children alike was destroyed in the wake of this scandal," Cox said Thursday.

According to a court documents, Caraway received about $390,000 from Leonard for real estate consulting and knew a portion of the excessive funds were to secure his political influence to further Leonard's business interests.

In one instance in 2012, Caraway voted in favor of a city ordinance creating a civil fine and offense for "passing a raised stop-arm camera on a school bus," the document said.

"Caraway knew that the vote would benefit Leonard financially and knew that (Force Multiplier Solutions) needed the ordinance for its program with (Dallas County Schools)," according to the document.

Caraway received kickbacks in part through luxury suits, gambling money, the repayment of personal debt and fully funded trips, according to federal prosecutors. They added he also received funds through checks, which he cashed at liquor stores and pawn shops.

In his resignation letter, Caraway said he "must take responsibility" for his actions.

"I am truly sorry that I must end my career as an elected official because I betrayed the public's trust that I worked so very hard to earn" he wrote.

City Council member Philip Kingston described Caraway's actions as "disturbing behavior" and said there is no way to minimize the danger it does to the credibility of the council.

"It's just a sad day in Dallas," Kingston said. Caraway's accomplishments will be erased by the charges.

Dallas Mayor Mike Rawlings said in a statement that he was saddened by the news.

Caraway's attorney, Michael Payma, said Thursday morning that the court documents speak for themselves. He said Caraway must still be sentenced and declined to comment further.