Several countries in the European Union have come to an agreement to take in more than 200 migrants.
More than 100 of those migrants were aboard the search and rescue ship Aquarius, which has been stranded in the Mediterranean Sea since last week. Malta has agreed to let it dock.
The Spanish government said it's the first operation of this type of distribution between several European states.
Under the deal, Spain, France, Germany, Portugal and Luxembourg will each take in a number of the migrants who were on the Aquarius. Malta also rescued more than 100 migrants on Monday, and 60 of them will be taken in by other EU member countries.
This has been an ongoing crisis in Europe. In June, Spain took in more than 600 migrants who were stranded on a ship in the Mediterranean after Italy refused to let it dock.
And in July, Italy helped rescue 450 migrants from a fishing boat in the Mediterranean. Those migrants were also divided between several countries.
Tuesday's agreement was made in an effort to split the responsibility of taking in stranded migrants between more than one country. The Maltese government called it "a concrete example of European leadership and solidarity."