San José, Costa Rica - A banner depicting a school of hammerhead sharks flutters over the heads of angry protesters outside Costa Rica's Legislative Assembly.

The spirited demonstration was spurred by the authorised export of as much as 1,611 kilogrammes of endangered hammerhead shark fins - despite new international regulations protecting the species.

Below the sharks' gaze from the banner, the mob surrounds a frenzied man with a microphone.

He is Randall Arauz, a marine biologist and president of the marine conservation organisation Pretoma. Arauz has spent decades fighting to protect sharks - some species of which have declined 90 percent in the last 15 years.

"This is about more than just sharks," Arauz told Al Jazeera. "This is an ecosystem problem. If you get rid of the ocean's top predators, everything changes."

Despite conservationists' efforts, endangered sharks are still killed legally in the country's waters, and gaps in already-lax fishing laws allow the government and fishing companies to continue skirting these regulations.

Costa Rican fishing authorities point to impoverished coastal communities to justify their lenience, but conservation groups say if the overfishing persists, the fisheries may become so damaged there will be nothing left for fishermen to catch.

"It's very frustrating because we know how endangered sharks are, but there is a global reluctance to protect them," Arauz said.

A win for sharks

At the beginning of 2015 there was some good news for sharks and conservationists trying to save them.

Following a decades-long shark-finning boom that led to the death of up to 273 million sharks per year, a new study released in April showed the shark-fin trade - the primary driver of shark deaths - was on the decline thanks in large part to environmentalists.

Conservation groups launched awareness campaigns in Asia, which led to dramatic declines in the demand for shark fin, and helped usher in shark-fishing regulations around the world.

China's appetite for shark fin soup

This decline has been evident in Costa Rica. In 2008, the tiny country was the world's sixth-largest exporter of shark fin, shipping 327 tonnes almost exclusively to Asia. But by 2012, that number had fallen to 67 tonnes.

That same year, Costa Rica banned shark finning, ruling all sharks needed to be brought to shore with the fins "naturally attached" to the body.

The new regulations led many Taiwanese ships known for finning in Costa Rica to leave the country, but a smaller shark-fishing fleet still thrives in part because of lax enforcement of the law.

"There have been many different interpretations of these new policies," Viviana Gutiérrez, from the marine conservation organisation MarViva, told Al Jazeera.

One such interpretation led to the acquittal of one exporter accused of shark finning in April 2014. The accused, Kathy Tseng, had authorised fishermen aboard a boat she owned to unload 322 shark carcasses from the ship's hull.

Fishermen sliced off all the sharks' flesh, leaving only the fins attached by small strips of skin. They argued the fins were still naturally attached to the body.

The judge ruled that Tseng had not broken the law and acquitted her. This "spining" method has not been seen since, but it was the judge's reasoning that conservationists found troubling.

"There are still holes in the laws here," Gutiérrez said. "Holes, a lack of regulation, and crime - those are the problems."

Skirting a treaty

In March 2013, Costa Rica was among several countries to push for the inclusion of some species of hammerheads into Appendix II of the Convention on International Trade in Endangered Species of Wild Fauna and Flora, known as CITES, an international treaty to protect wildlife.

Species listed in Appendix II can be commercially exploited by a member country as long as the government conducts studies to prove that trade is not detrimental to its population, with what is known as a non-detrimental finding, or NDS.

Along with supporting the addition of hammerheads to CITES, Costa Rica pushed for a quick deadline requiring signatories to conduct the NDS and implement regulations by September 14, 2014.

Costa Rica didn't meet the deadline, however, and when two companies filed a request to export 411kg of hammerhead shark fins in November that year, there was no NDS to refer to.

Costa Rica's own fisheries' institute issued a letter certifying the export did not endanger the hammerhead population.

The letter did not cite any studies to substantiate this claim. Two months later, authorities received another export request for 1,200kg of hammerhead fins.

This time the CITES' Council of Scientific Authorities - a group of local experts tasked with ensuring CITES compliance - stepped in and rejected the request, but it was overruled by Costa Rican authorities who declared the export a matter of public interest, because of its economic value to fishermen on the coast.

"These sharks were caught and their fins frozen before CITES went into effect," Julio Jurado, executive director of Costa Rica's national parks system who signed the order, told Al Jazeera.

"They were caught as bycatch with other fish, and it's unfortunate but they were just sitting there already dead."

'A license to kill'

Jurado's reference to "bycatch" highlights another gap in Costa Rican fishing law.

The easiest way to hook large numbers of sharks is by using longlines, lengthy strips of fishing line covered in strings of hundreds, sometimes thousands, of hooks.

In Costa Rica, longline licences are given to fishermen who intend to catch mahi-mahi, but anything else caught on their hooks is considered bycatch and can be kept and sold.

There are no specified fishing seasons for longlines, so licensed boats fishing during times when there are no mahi-mahi will bring in mostly sharks.

"This licensing scheme effectively allows fishermen to target sharks," Arauz said. "They add the word 'bycatch' at the end of the licence and that effectively nullifies the intent of the licence. It turns it into a licence to kill."

After signing the last export permit, Jurado signed another order putting a moratorium on all hammerhead exports until a non-detrimental finding is completed. The study will determine whether or not Costa Rica will allow hammerhead fin exports in the future.

Conservation groups say the exports are in direct violation of CITES, though the Costa Rican government denies that claim.

Like many international treaties, CITES is only loosely enforced with no specific punishment for infractions.

Though exported shark fin brings in large profits, only a small percentage of that money reaches Costa Rican fishermen who caught the sharks. The lion's share goes to foreign exporters.

According to conservation groups, the lack of fishing regulations is allowing mid-sized and industrial ships to wipe out coastal fisheries, leaving fewer fish for Costa Rican-owned fishing operations.

Australia to authorise killing of large sharks

"This case is extremely grave, possibly the most grave we have seen," Gutiérrez said.

"The government declared the exports a public interest because of the economic situation on the coasts, but that shows a lack of understanding about how this overfishing is perpetuating poverty for fishermen."

With the CITES studies now under way, conservation groups are pushing for tighter regulations on shark fishing.

"We don't want to close down the fishery because that is unrealistic," Arauz said.

"What we want is a management of the fishery. No more dead hammerheads and fewer dead sharks. That's what we want."