A group of 49 migrants that were left stranded on board two NGO-operated rescue vessels disembarked in Malta on Wednesday afternoon.

The migrants were brought to shore by the Armed Forces of Malta (AFM) after they were transferred at sea from the two ships that were carrying them.

The disembarkation marks the end of an almost three-week ordeal, which saw European member states refuse the disembarkation of the rescued people until a relocation agreement was reached.

READ ALSO: Stranded migrants will be brought ashore after EU countries pledge support, Joseph Muscat says

Germany, France, Portugal, the Netherlands, Ireland, Romania, Luxembourg, and Italy agreed to share 224 migrants, with Malta taking 74.

The 224 migrants include some which were among a group of 249 rescued by the AFM over the Christmas period.

Prime Minister Joseph Muscat said the NGO vessels will have to leave Maltese territorial waters after transfering the people to the AFM patrol boat.

READ ALSO: Matteo Salvini opposes new migrant arrivals in Italy despite relocation agreement