Shaw Group Inc. chief executive James Bernhard sold most of his stock in the company on Dec. 28, one week after shareholders approved a sale to CB&I, according to filings with the U.S. Securities and Exchange Commission.

SEC filings show Bernhard sold 988,247 shares for more than $45 million. Bernhard, chairman, president and chief executive officer of the company, still owns 143,356 shares of Shaw, whose deal with CB&I is expected to be completed in mid-February.

By selling in December, Bernhard avoided higher taxes that took effect in 2013.

Ralph Stephens, tax director at Postlethwaite & Netterville, said he couldn’t comment on specifically what happened at Shaw, but said no one could have known then exactly how much additional tax would be avoided with the uncertainty surrounding budget and tax negotiations in Washington, D.C.

Before Congress passed the “fiscal cliff” legislation this week, the capital gains tax was 15 percent, Stephens said. If Congress had not done anything, the tax on capital gains would have increased to 20 percent, Stephens said. In addition, the tax rate would include tax of 3.8 percent to help pay for the Affordable Care Act, and the lowering of itemized deductions, in effect a 1.2 percent tax increase.

“Basically, they would have been looking at a 25 percent federal tax rate versus a 15 percent tax rate,” Stephens said.

That’s why a lot of people sold real estate and stock before the end of the year, Stephens said. Many of those property and investment sales took place after the presidential election because people figured the capital gains tax rate would go up in 2013.

Some other Shaw executives and board members also sold all or most of their shares, according to SEC filings showing transactions that took place on Dec. 27.

John Donofrio, executive vice president and general counsel, sold 40,333 shares. Eli Smith, president of Shaw’s power group, sold all of his stock, 19,567 shares. George Bevan, president of Shaw’s environmental and infrastructure group, sold 60,711 shares.

Board member David Hoyle, North Carolina Department of Revenue secretary, sold 66,180 shares. Board member Albert McAlister, a partner in South Carolina law firm McAlister & McAlister PA and related entities, sold 128,141 shares.

The Shaw Group did not respond to a request for comment.