In the last week, the E.U. approved two trade deals with Morocco that include the disputed territory known as Western Sahara as part of the country.

This move breaks with the E.U.’s usual position, which has not formally recognized Morocco’s sovereignty over the region. E.U. officials affirmed these controversial terms in an agricultural agreement signed on July 17, and in a fisheries agreement signed on July 20.

The fisheries agreement, which has existed since 2007, allows European ships to fish in Moroccan territorial waters in the Atlantic Ocean in exchange for $47.6 million in fees. The E.U. Court of Justice (ECJ), concerned about legitimizing Morocco’s territorial claim on Western Sahara, ruled in February to exclude the region from the fisheries agreement. Consequently, the agreement expired on July 14 without renewal, forcing E.U. ships to leave Moroccan waters.

After a week of negotiations, the E.U. and Morocco, thumbing their nose at the court, reached an accord and approved the deal to include Western Sahara in its terms. Rabat had made it clear to Brussels that, for any deal to pass, Morocco would have to be the sole representative of the region, excluding the Polisario, the representative of the Saharan independence movement.

The disputed region is bordered by Mauritania, Algeria, and what is internationally recognized as Morocco. To most of the world,Western Sahara is a disputed territory, but to Morocco, it is the Southern Provinces.

The region’s history is a thorny, complicated subject. Morocco’s claim to sovereignty is based on the idea that the region was under its control previous to Spain’s colonial claim in 1884. Since that year, Spain maintained its control of the territory until 1975.

An indigenous Sahrawi movement coalesced into the Polisario Front in 1973, first intended to fight for independence from Spain. Spain conceded control of the region to both Morocco and Mauritania in 1975. Mauritania renounced control over its portion of the territory in 1979.

Since then, Morocco has claimed and administered the region and Polisario has fought independence from Morocco. It seeks a sovereign state, the so-called Saharan Arab Democratic Republic (SADR). An armed conflict erupted between the Polisario and the Moroccan government in 1976, lasting until a U.N.-brokered ceasefire in 1991.

The conflict displaced tens of thousands of Sahrawis into refugee camps in Algeria and Mauritania, where close to 90,000 people continue to live. The refugee camp in Tindouf, Algeria, is the base of the Polisario Front and seat of their self-proclaimed government-in-exile. Since the 1970s, Algeria has been the strongest supporter of the Polisario Front, causing intense antagonism with Morocco. The two countries closed their mutual border in 1994.

The situation is highly politicized. Morocco and the Polisario have both tried to garner international recognition of their sovereignty. Morocco’s claims are supported by the Arab League and tacitly endorsed by France and the U.S. However, no member of the U.N. has officially recognized Moroccan possession of the region.

In contrast, 37 nations have formally recognized the Polisario and the African Union offered SADR membership in the union. In a 1979 resolution, the U.N.  referred to Morocco’s presence in the region as an “occupation,” and the Polisario as the “representative of the people of Western Sahara.” It reaffirmed Sahrawis’ right to “self-determination.” Since then, it has avoided this language, seeking a more neutral position. It has maintained a peacekeeping force in the region since 1991. Western Sahara is the largest on the U.N.’s list of “non-self-governing territories.

The E.U. has been noncommittal and often contradictory in its actions towards the region. In 2016, the ECJ annulled its 2015 decision to heed the Polisario’s plea to suspend the E.U.-Morocco agricultural agreement. This year, the ECJ sided with the Polisario again, only to be ignored by the deal-making European Commission. The agricultural deal gives the E.U. a stronger, yet flawed, legal basis for importing goods from Western Sahara, which it claims will “optimize the…benefits for local populations.”

The Polisario Front’s delegate minister for Europe, Mohamed Sidati, called this “lie and hypocrisy.” He denounced both of the deals as “shameful,” saying that they violate the ECJ rulings, contradict the “U.N.-led peace process” and “only [encourage] the Moroccan occupation of the Sahrawi territories.” Morocco, Sidati claimed, is “steal[ing] the resources of Western Sahara people, who largely live in exile and in poverty, deprived of their land and sea. And the European Commission is accomplice to this robbery.”

The area currently administered by Morocco contains all of the sparsely populated region’s significant cities and all of its profitable natural resources. Sidati implored the E.U. to make deals instead with the “only legitimate representative of the Sahrawi people, namely the Polisario Front.”

The Polisario stated that it plans legal action against the E.U. Some European legal commentators claimed the ECJ’s decision overstepped its role and set a risky precedent that would encourage independence movements in other contested regions to use the court to challenge E.U. economic deals.

Spain and France were most active in advocating for the renewal of the fisheries agreement. Of the 120 permitted fishing vessels from 11 European countries, 90 are Spanish. Seeing employment potential for the economically weak Andalucia region, Spain has the most riding on the deal. However, a 2011 report showed that the fisheries deal is much more profitable for Morocco than it is for Europe.

Morocco’s maritime fisheries are the largest in Africa and 25th most productive in the world, making up 2.3 percent of the kingdom’s GDP. Over 90% of Europe’s catches in Moroccan-claimed maritime territory are in Saharan waters, according to Western Sahara Resource Watch (WSRW). WSRW reported that European fishing vessels “have been caught fishing illegally in occupied Western Sahara” even after the ECJ invalidated the E.U.-Morocco fisheries agreement.

The E.U. and Morocco established a mutual free trade area in 2000, from which Morocco benefits significantly. Europe is Morocco’s “largest trading partner,” according to the European Commission, “accounting for 59.4 [percent] of its trade in 2017.”

Morocco exported over $3.5 billion of agricultural products to the E.U. in 2016. However, with almost no rainfall in Western Sahara, its agricultural sector is limited to oasis-type, irrigated farming, and goat, cow, sheep, and camel husbandry. And while Morocco’s fisheries (along with phosphate mining) account for the majority of the Western Sahara’s economy, Morocco’s push for inclusion of the region in trade deals is “98 percent political,” says Swedish law professor Pål Wrange.

The E.U.’s decision is widely seen as capitulating to Morocco and an implicit recognition of its claims to sovereignty in the Western Sahara. Nonetheless, an E.U. spokesperson maintained that the trade deal does not change the E.U.’s “general position on Western Sahara” and that it supports the U.N. peace process.

Throughout the trade deal negotiation process, Morocco has flexed its diplomatic muscle, even going as far as to ask for $80 million in fisheries fees, double those of the previous agreement.

It is clear that Morocco is well aware of the leverage it holds over the E.U. The North African kingdom has become a major transit point for the thousands of sub-Saharan and North African people seeking to migrate to Europe. Morocco is separated from mainland Spain by only 9 miles of water, which has been crossed by migrants in boats. The Spanish territories of Ceuta and Melilla are contiguous with Morocco and bounded by fences. Thousands of migrants have climbed these fences to gain asylum in Europe.

Spain and the E.U. rely on Morocco to stem this irregular migration into Europe, as well as to combat religious extremism. Morocco reminded the E.U. of its power in 2017 following the E.U.’s suspension of agricultural trade with Morocco. Morocco looked the other way as 1,100 migrants crossed the fences into Ceuta and Melilla in three days – more than in the whole of 2016.

In these most recent trade deals, Europe seems to have leaned toward Morocco’s influence, to the chagrin of the Saharan independence movement.