U.S. Commerce Secretary Wilbur Ross said in a statement Thursday evening that he would be selling all of his equity holdings and buying Treasury securities with the proceeds — after receiving a letter from the U.S. Office of Government Ethics saying Ross could "run afoul of the primary criminal conflict of interest law."

"As a high level public official, you have an affirmative duty to protect the public trust and serve as a model of ethical behavior. This duty includes exercising the care necessary to fully and timely comply with your ethics commitments, and be accurate in statements to OGE regarding the same," David J. Apol, the office's acting director and general counsel, said in the Thursday letter to Ross.

The letter was sent after the financial holdings of Ross came under scrutiny in recent months. Apol said financial disclosure forms and compliance documents that the commerce secretary submitted "contained various omissions and inaccurate statements."

Last November, Ross told the office in writing that he had divested every holding he had promised to do. But another transaction report was submitted one month later detailing two sales of Invesco stock. Invesco is Ross' former employer.

The November filing signed by Ross had indicated that intentionally false or misleading statement in the form is a violation of law. That's a warning that "should have triggered a more serious focus by Ross on the accuracy of his representations," said Walter Shaub, an attorney specializing in government ethics and the former head of the OGE.

Media reports in recent months revealed that Ross held, or had held, stakes in companies whose fortunes could be affected by U.S. trade policy decisions, with which Ross is intimately involved.

Among his controversial holdings were stakes in companies co-owned by China's government, a shipping firm linked to Russians that he short sold days before his ties to it were exposed. He also held more than $10 million in stock of his former employer, Invesco, despite earlier swearing he had divested those holdings.

Ross was also revealed to have taken short positions in stocks including Air Lease and Ocwen Financial Corporation, which he said were "technical ways of disposing the stocks." But such claims had been criticized.

Richard Painter, who served as chief White House ethics lawyer under President George W. Bush, told CNBC earlier this month: “I never heard of someone using short positions to divest.”

“I helped in hundreds of transactions for employees entering government,” noted Painter, who is now a Democratic candidate for senator in Minnesota. “This is not an acceptable situation.”

Sen. Ron Wyden, D-Ore., said controversy over Ross’s financial dealings could weaken efforts to improve America's trade position.