Congress on Wednesday gave final passage to legislation that would shut down legal cockfights in U.S. territories including Puerto Rico and the U.S. Virgin Islands, ending an institution dating from the colonial era that generates millions of dollars each year.

Opponents of the measure approved by the House said it will have a devastating effect on the islands' economies, noting that in Puerto Rico alone the cockfighting industry generates some $18 million a year and employs more than 20,000 people.

"We're all going crazy. Everybody is desperate," said 86-year-old Angel Ortiz, who owns a cockfighting ring in the city of Bayamon. "There are so many people who make a living off of this."

Puerto Rico Gov. Ricardo Rossello traveled to Washington to demand that the island be excluded, but he arrived too late. Legislators unexpectedly moved up the vote and approved the bill, which already passed the Senate.

Cockfighting in Puerto Rico was first officially recognized in 1770, but the practice was banned after the U.S. invaded the island in 1898. It wasn't until 1933 that it was declared an official sport and became known as the "gentleman's sport" because of its honor-based betting system.

In October 2010, Puerto Rico legislators voted in favor of a resolution to protect cockfights, stating they are an integral part of the island's folklore and patrimony. Officials warn that the ban will lead to unemployment on an island already dealing with a 12-year recession.

"It is a cultural and economic pillar for Puerto Ricans," Public Affairs Secretary Ramon Rosario said. "In addition to its cultural value, the cockfighting industry is the only source of livelihood for thousands of Puerto Rican families."

Some critics reject that cockfighting has any cultural value.

Ashley Byrne, associate director with PETA, said in a phone interview that the bill was long overdue and will help protect animals.

"Money and tradition are never an excuse for cruelty," she said. "We need to make sure that business is keeping pace with our ethics."

She said most people would be appalled to learn that cockfighting is still legal in U.S. territories.

"In a modern society, forcing animals to fight for their lives is cruel," she said. "Cockfighting is a horrific blood sport."

Many in Puerto Rico were saddened by approval of the ban, which is expected to go into effect in a year.

Miguel Trinidad, who owns a cockfighting ring in the northern town of Caimito, said he was stunned by the vote. He recently invested $50,000 cash to rebuild his business after Hurricane Maria.

"Now they say they're going to shut it down," he said with a sigh, noting that his father first opened the business 50 years ago. "It makes me very sad."

Supporters say many people beyond owners of cockfighting rings will be affected. They note that thousands of people are hired to raise the animals, shear them, feed them and shelter them.

Pedro Casillas, administrator of an animal supply store in Bayamon, said he fears having to lay off employees and possibly close his business.

"Food for cocks is what we sell the most," he said. "It represents three-fourths of our sales."

But Casillas and Ortiz also think the legislation won't succeed because the ban will only drive cockfights underground.