BANGKOK — A Malaysian court on Thursday dismissed money laundering charges against the Hollywood producer Riza Aziz, a stepson of the country’s disgraced former prime minister Najib Razak, under an agreement in which he will return assets worth more than $107 million.
Mr. Riza, whose Red Granite Pictures produced the Oscar-nominated film “The Wolf of Wall Street,” had been accused of laundering $248 million in money misappropriated from a government investment fund while it was under his stepfather’s control.
The charges were part of a long-running, billion-dollar scandal involving Mr. Najib and his spendthrift family members that brought down his government two years ago. But shifting political tides have returned his allies to power, and some critics questioned whether dropping the charges against Mr. Riza was a sign that the new government was preparing to go easy on Mr. Najib.
The Malaysian Anticorruption Commission, which investigated the case, said Mr. Riza’s agreement to return the assets from overseas was an “an alternative to the charges that have been brought against him.”
A Kuala Lumpur court agreed to the prosecution’s request for a dismissal of the five counts against Mr. Riza, technically a “discharge not amounting to an acquittal.” He faced up to five years in prison on each count.
The charges could be reinstated if he does not live up to the terms of the agreement, the anticorruption commission said in a statement. Details of the agreement were not made public, but the prosecutor in the case, Gopal Sri Ram, told the court that the government would receive a “substantial sum” from Mr. Riza.
Lawyers for Mr. Riza did not respond to requests for comment. They previously maintained that he had done nothing wrong and that he was “collateral damage in a political crusade to jail his stepfather.”
Mr. Riza faced charges along with his mother, stepfather and a longtime friend, Jho Low, in the disappearance of as much as $4.5 billion from a government investment fund, known as the 1Malaysia Development Berhad.
The $248 million that Mr. Riza received was transferred from accounts in Switzerland to a Red Granite bank account in amounts ranging from $1.2 million to $133 million, according to the charges against him.
Officials did not explain why Mr. Riza was required to return less than half of the $248 million he was accused of laundering.
The scandal sparked outrage in Malaysia, and Mr. Najib was voted out of office in 2018. He was replaced by his onetime mentor, the former prime minister Mahathir Mohamad.
Mr. Mahathir, in turn, was ousted as prime minister in February after the country’s constitutional monarch said he lacked majority support in Parliament. He was replaced by Muhyiddin Yassin, a veteran politician aligned at various times with both Mr. Mahathir and Mr. Najib.
In taking over, Mr. Muhyiddin reunited with the United Malays National Organization, the governing party of Mr. Najib, prompting concerns that the former leader and his associates would receive favorable treatment in the corruption case.
Under Mr. Mahathir, government prosecutors brought charges against Mr. Riza, Mr. Najib and others who were said to be involved in the theft of government money from the investment fund, known as 1MDB.
The United States Justice Department, which tracked the movement of billions of dollars from the fund, accused Red Granite Pictures of using some of the stolen money to produce “Dumb and Dumber To” and “Daddy’s Home” as well as “The Wolf of Wall Street.”
The authorities say that $731 million in government funds, most of it originating from 1MDB, was deposited into Mr. Najib’s own bank accounts. When that became public, he claimed that most of it was a gift from a member of the Saudi royal family.
In raids on properties owned by Mr. Najib and his wife, Rosmah Mansor, the police seized as much as $273 million worth of cash, jewelry and luxury handbags.
Mr. Najib has been charged with more than 40 criminal counts and is now being tried on some of them.
Government critics called on the new attorney general, Idrus Harun, to explain the decision to dismiss charges against Mr. Riza. Mr. Idrus could not be reached for comment.
“It gives rise to the impression that this has something to do with UMNO, Najib Razak’s political party, and its return to power earlier this year, rightly or wrongly,” said Syahredzan Johan, a lawyer and secretary of an opposition party. “An explanation would go some way to dispelling the negative perception that people have.”