According to the Associated Press, A former SeaWorld executive who purchased $385,000 in company shares after learning that the theme park business was expecting improved revenue and attendance pleaded guilty on Tuesday to a single count of insider trading.

Paul Powers, 60, entered the plea Tuesday in federal court in Orlando, Florida. He faces a maximum of 20 years in prison and a $5 million fine when he is sentenced, though prosecutors said in a court filing they will seek a “downward adjustment” from that.

As the company’s associate general counsel, Powers was able to view information on revenue and attendance before it became public. Because of this access, he was only permitted to make purchases or sales of SeaWorld stock during a limited time period, and purchases required approval of the company’s general counsel.

Powers purchased 18,000 shares of SeaWorld stock in August, just days before the company planned to report a strong financial quarter, and six weeks after he was permitted to make any trades, according to federal prosecutors.

On the day last August that SeaWorld reported its improved revenue for the second quarter, the value of the company’s shares shot up by 17 percent. Powers sold those shares and made a profit of almost $65,000, according to a federal complaint.

“All of which was ill-gotten gains from his fraud,” the complaint said.

The trade Powers made came at a turning point for SeaWorld, which had suffered declining attendance and revenue since 2013 following the release of the documentary “Blackfish.” The film focused on the life of Tilikum, a killer whale responsible for killing trainer Dawn Brancheau. Tilikum dragged Brancheau into a pool in front of shocked visitors in 2010, and the movie implied that killer whales become more aggressive in captivity.

During that period, SeaWorld’s value declined from $33 a share to $13 a share.

In the spring of 2018, SeaWorld started showing noticeable improvement in its business performance. After SeaWorld announced its second-quarter earnings in August 2018, the company’s value rose from $21.13 a share to $25.40 a share.

Powers had worked at SeaWorld for seven years until he was fired by SeaWorld last October after the trade came to light.

“After being contacted by authorities late last year, the company conducted an investigation, which resulted in termination,” SeaWorld said Tuesday in a statement. “The company cooperated fully with the authorities in their investigation.”