PETA thinks SeaWorld is all wet.

The animal rights organization is weighing legal action against the theme-park operator after the SeaWorld chief executive admitted Thursday that it had spied on the nonprofit, The Post has learned.

The two sides have been locked in a battle for years over the treatment of SeaWorld’s orcas.

PETA believes the giants of the sea used in the parks’ shows are not well treated.

The criticism of SeaWorld hit a peak in 2013 with the release of “Blackfish,” a film about one of the company’s orcas.

SeaWorld, in an attempt to blunt the criticism, which it feels is incorrect, had an employee pose as an animal rights activist and join PETA.

News that the subject of “Blackfish” resorted to black operations sent SeaWorld shares down 9.2 percent on Thursday, to $18.01.

Chief Executive Joel Manby said during a call with investors Thursday morning that the company’s board ordered an end to the spying.

The black ops were undertaken “to protect employees, customers and animals in the face of credible threats,” Manby said.

He did not apologize for the snooping.

Last year, PETA accused a SeaWorld employee of infiltrating its organization. An activist known as Thomas Jones was actually Paul McComb, a human-resources employee at SeaWorld San Diego, PETA said.

McComb used social media to contact other activists and glean inside information while inciting activists to take part in illegal tactics against the company, according to PETA.

At the time, SeaWorld responded by saying that it was “focused on the safety of our team members, guests and animals, and beyond that we do not comment on our security operations.”

On Thursday, Manby said McComb, who was placed on leave while the company probed the PETA allegations, has returned to work. He would not say whether any employee had been fired or disciplined in connection with the surveillance operation.

PETA, incensed after Manby admitted the spying, might sue SeaWorld, sources close to the organization said.

“The tawdry orca sideshows and despicable spying tactics are sinking SeaWorld’s ship,” PETA said in a statement.

The company’s decision to come clean about the spying matter also caught some close observers off guard.

“I was a little surprised,” Dennis Speigel, president of consultancy International Theme Park Services, told The Post. “We never knew for sure that they were spying on PETA.”

SeaWorld’s stock and attendance have been tanking since “Blackfish,” which portrayed its captivity and public exhibition of orcas as cruel.

Under pressure from California lawmakers, SeaWorld in San Diego has said it would suspend its live whale shows, although they continue at the company’s other parks.

Fourth-quarter results released on Thursday show that SeaWorld’s troubles may be easing.

Attendance at SeaWorld parks rose 1 percent in the fourth quarter.