The United Arab Emirates will exit OPEC on May 1, in a major blow to the cartel that coordinates production among many of the world's largest oil producers, particularly those in the Middle East.

The shock announcement Tuesday comes after the UAE was the target of missile and drone attacks for weeks by fellow OPEC member Iran. Tehran's attacks on shipping in the Strait of Hormuz has also severely constrained the UAE's ability to export oil, threatening the foundation of its economy.

The UAE has played an influential role in OPEC's decisions over nearly six decades. It was the group's third-largest oil producer in February behind Saudi Arabia and Iraq. The Gulf state joined OPEC in 1967, seven years after the organization was founded.

The UAE came to the conclusion that exiting the group was in its national interest following a comprehensive review of its production policy and capacity, the Energy Ministry said in a written statement.

Energy Minister Suhail Al Mazrouei subsequently told CNBC that the UAE made the decision to leave OPEC at a time when it would be the least disruptive to the other producers in the group.

"Our exit at this time is the right time for it, because it will have a minimum impact on the price and it will have a minimum impact on our friends at OPEC and OPEC+," Al Mazrouei said.