Mohammed Barkindo, secretary general of the Organization of Petroleum Exporting Countries (OPEC), speaks during a news conference following the 174th Organization Of Petroleum Exporting Countries (OPEC) meeting in Vienna, Austria, on Friday, June 22, 2018.

Oil producing group OPEC is responsible for salvaging the entire oil industry with its deal to curb output, OPEC's secretary general told CNBC, but the U.S. shale revolution has helped to prevent "major, major energy chaos" in the world.

"OPEC has been doing a great service," to producers and global oil markets, Secretary General Mohammad Barkindo told CNBC's Dan Murphy in Riyadh on Wednesday.

"The decisions that OPEC took, together with our non-OPEC partners, literally rescued this industry from total collapse," he said.

Asked for his perspective on the U.S. Congress' consideration of antitrust legislation that could hurt OPEC – specifically, the "No-Oil Producing and Exporting Cartels Act" (NOPEC) bill that could allow OPEC to be sued for coordinating production and influencing oil prices – Barkindo said actions taken by OPEC had in fact helped U.S. producers.

"You can ask the producers in the shale basins in the U.S. whether they have benefitted from the actions we have taken over the years," Barkindo said.

"In particular, during this longest cycle where we saw prices crash by over 80 percent at one point, where we saw the supply and demand balance in (a period of) disequilibrium that had never been witnessed, where we saw more than 100 U.S. companies file for bankruptcy with all the negative consequences on the industry, the regions where they operate … no party was insulated," he said.