The 35 men from Yemen found the carcass of a sperm whale floating in the sea, which turned out to contain more than $1.5 million worth of rare and valuable ambergris, BBC News reported on Tuesday.

Ambergris is a strange, waxy substance with an almost rock-like appearance—sometimes referred to as “whale vomit”—that is produced in the intestines of sperm whales.

The substance, which is sometimes found floating in the ocean or washed up on beaches around the world, has long been highly prized by humans. In the past, people have used the substance as a medicine and even an aphrodisiac.

Ambergris has also been highly valued by perfumers as the substance helps scents last longer. Today, ambergris has mostly been replaced by synthetic alternatives in all but the most expensive perfumes due to issues of cost and accessibility.

One of the fishermen featured in a BBC News video said: “If you find whale ambergris it’s a treasure.”

The man in the video said another fisherman from Seriah in southern Yemen had notified him and several others that there was a whale carcass floating in the ocean, and that it may contain ambergris.

“As soon as we got close to it, there was this strong smell, and we had the feeling that this whale had something,” the fisherman in the video said. “We decided to hook the whale in, take it to the shore and to cut into it to see what was inside its belly. And yes, it was ambergris. The smell wasn’t very nice but [it was worth] lots of money.”

“It’s like an unbelievable dream. Wonderful feelings I can’t describe,” he said.

Yemen has been in the grips of civil war since 2014. The conflict has devastated the country, with the United Nations estimating in October last year that 80 percent of the population—more than 24 million people—required some form of humanitarian assistance and protection. Meanwhile, the U.N. said that around 70 percent of the country’s districts were at risk of famine.

Amid the dire situation in their homeland, the fishermen who found the ambergris were able to lift themselves out of poverty after finding and selling the ambergris for $1.5 million.

“It was an unimaginable price,” another fishermen in the group said in the BBC video.

The fishermen divided up the profits equally among themselves, while also sharing the money with people who helped them and others in their village who were in need.

The men bought houses, cars and boats, while one said he would use some of the money to get married. Despite their incredible luck, the men continue to fish.

The origin of ambergris had long been a mystery, but large-scale whaling efforts in the 19th century revealed that the substance was produced by sperm whales.

Sperm whales eat large quantities of cephalopods, such as squid and cuttlefish, which have beaks and other body parts that cannot be digested. Most of the time, the whales vomit out these parts. But on rare occasions, the parts move through the intestines of a whale.

Experts think that whales produce ambergris in these situations to smooth the passage of these hard objects and protect their internal organs. The substance is rare, however, and has only found in less than five percent of sperm whale carcasses.

Some believe that the whales eventually regurgitate the solid mass, which is where the nickname “whale vomit” comes from. But others think that the whales may pass the ambergris through their rectum, or that the mass causes a dangerous obstruction, which can prove fatal.