Basking sharks are endangered because so many people around the world like to eat shark fin soup.
Hunters also threaten the shark as their fins can be sold for thousands of pounds.
Although sharks have a bad reputation, animal rights campaigners describe them as "gentle giants".
But the British government passed a vote at the Convention on the Trade in Endangered Species on Friday to protect the sharks.
The agreement means that basking sharks can only be fished by those with licences.
The world's largest shark, the Whale shark, is also protected by the agreement.