SeaWorld has had a rough few years.

The company, which has been cutting costs, announced Wednesday that it's laying off 350 employees in the face of low park attendance.

"It is an unfortunate, but necessary, consequence of the restructuring that some positions will be lost," spokeswoman Aimée Jeansonne Becka said in a statement.

The layoffs include some open jobs that won't be filled, and are mostly focused on administrative positions, Becka said. They'll primarily affect the company's corporate office, as well as its parks in Orlando and San Diego.

At the beginning of 2017, SeaWorld employed 5,000 full-time workers and 8,300 part-time workers, according to a corporate filing. It currently operates 12 parks across the U.S.

Related: Easter wreaks havoc with SeaWorld attendance

SeaWorld's attendance for the first half of 2017 was down by roughly 353,000 guests compared to the first half of 2016, according to the company's August earnings report.

The declines were "largely concentrated at the company's SeaWorld parks in Orlando and San Diego," the company said, adding that "public perception issues" were a particular concern in California.

SeaWorld has been on a mission to rebuild its brand in the wake of protests over its treatment of killer whales -- a problem that was highlighted in the 2013 documentary "Blackfish."