After years of legal woes and acting under a court order, Carnival Corp. on Monday named former federal prosecutor Peter Anderson as its first chief ethics and compliance officer.

Anderson, who was not available for comment, brings a strong environmental background to the job. He said in a statement he looked forward to working with the Miami-based cruise line “to help build an ethics and compliance program that is truly world class. Our strategic plan involves goals and key actions to build a strong and proactive compliance culture that is based on open communications—both listening and responding—as well as adequate resources and improved tools.”

He already served as an outside consultant to the Miami-based cruise line and conducted an initial compliance assessment. Anderson will be a member of the executive leadership team and report directly to Carnival president and CEO Arnold Donald, with dotted line reporting to the board of directors.

In the company statement, Donald said, “Pete’s knowledge of global environmental law and corporate compliance makes him a valued addition to our leadership team, and we look forward to him playing a strong role in helping us consistently achieve and exceed our compliance objectives.”

After earning a bachelor’s degree in environmental science and policy from Rutgers University, Anderson obtained his law degree from the University of Virginia School of Law in 1991. He served as a trial attorney in the environmental crimes section at the Department of Justice until 1994, when he was named assistant U.S. attorney in Charlotte, North Carolina.

From 1996 to last month, he worked for various law firms as an environmental and white-collar crime defense attorney. Most recently he spent six years in the Charlotte office of the environmental law firm Beveridge & Diamond as head of its white-collar and compliance group. For the past two years, Anderson led the environmental compliance team on the Volkswagen monitorship.

Russell LaMotte, managing principal at Beveridge & Diamond, said, “What stands out about Pete is that he has combined his background as an environmental prosecutor with a deep study of what works from a compliance standpoint in large corporations.”

LaMotte said Anderson’s approach as a lawyer “was always first and foremost how to proactively ensure the companies were organized in order to avoid problems in the first place and minimize the chances they would need assistance from a white-collar defense lawyer.”

Anderson has his work cut out for him. Carnival operates nine separate brands—including Princess Cruise Lines Ltd., Costa Cruises SpA and Holland America Line N.V.—that are licensed in multiple countries, imposing a maze of rules and regulations that Anderson must navigate.

The company is undergoing major compliance restructuring to comply with three pages of federal court-imposed requirements, as part of its three-year probation agreement for environmental crimes signed in June. The hiring of a chief compliance officer topped the list of demands.

Among other things, the agreement also requires Carnival to restructure so that all of its cruise lines report to Anderson on compliance issues, as well as to a newly formed executive compliance committee. Anderson also oversees a chief compliance manager, who will help him train 120,000 employees and meet numerous court reporting deadlines.