WASHINGTON — Two of the world’s largest poker companies agreed to pay hundreds of millions of dollars, some of it to be reimbursed to online gamblers, to settle federal money laundering and fraud charges, the United States attorney for the Southern District of New York said Tuesday.


The deal, announced by Preet Bharara in a case filed in April 2011 against the two companies, PokerStars and Full Tilt Poker, was approved by Judge Leonard B. Sand of United States District Court for the Southern District.


As part of the agreement, PokerStars, which is based in the Isle of Man, off Ireland, will forfeit $547 million to the United States government, and will acquire Full Tilt Poker, which is based in Dublin. The $547 million will be available to victims of PokerStars activities and another $184 million will be made available from PokerStars to foreign victims of the Full Tilt Poker site.


According to court documents released on Tuesday, Full Tilt Poker had taken money from the accounts of the bettors and distributed it to its owners despite telling the bettors that they could withdraw their money at any time. The documents did not say whether any bettors had been prevented from withdrawing their money.


Mr. Bharara described the bettors as victims, saying the settlement would “allow us to quickly get significant compensation into the victim players’ hands.”


In a related matter, Mr. Bharara’s office asked the court to accept an agreement with a third company, Absolute Poker/Ultimate Bet, requiring the company to forfeit all of its assets.


In pursuing the settlement, the Justice Department had two goals: protecting online gamblers and acting swiftly to punish foreign companies that allow Americans to place wagers. (It is legal under United States law for an American to place a bet regardless of whether the casino or bet taker is legally registered to operate.)


In 2006, it became a federal crime for a company to accept money from an American for online gambling. But the law did not deter Americans from placing wagers online. According to one estimate, Americans were gambling $16 billion a year online before the authorities moved in 2011 to crack down on Poker Stars, Full Tilt and Absolute Poker. The head of the Federal Bureau of Investigation office in New York, Janice K. Fedarcyk, said in a statement that the settlement would allow “for serious compensation of victims” and that the case “should serve as a deterrent to others who look to actively circumvent United States law — onshore or offshore, you will be held responsible for those actions.”


“This is another shoe dropping in a longstanding effort by the federal government to try and freeze these companies out of the American market,” said Daniel C. Richman, a professor of law at Columbia and a former federal prosecutor. “As some state governments reconsider their gambling laws, we may see more of these cases against foreign gambling companies.”


The authorities charged the poker sites with money laundering and fraud in April 15, 2011 and blocked Americans’ access to them. To many online gamblers, the day became known as Black Friday. Several months later, the government filed charges, accusing executives of Full Tilt of operating a fraud much like a Ponzi scheme and stealing millions of dollars from gamblers’ accounts.


“Today’s settlements demonstrate that if you engage in conduct that violates the laws of the United States, as we alleged in this case,” Mr. Bharara said, “then even if you are doing so from across the ocean, you will have to answer for that conduct and turn over your ill-gotten gains.”


In addition to the charges against the companies, criminal charges have been filed against 11 people in connection with the government’s crackdown. Seven of them have pleaded guilty and four are still at large.


Among those at large is Isai Scheinberg, the founder of PokerStars. According to the documents released on Tuesday, Mr. Scheinberg will no longer be able to legally “serve in any management or director role at PokerStars.” And PokerStars will be “prohibited from employing” five executives who ran Full Tilt.