(CNN) A group of five European politicians spent Sunday night on a rescue ship stranded in the Mediterranean with hundreds of migrants on board, in a desperate bid to secure a port for the vessel to dock.

The lawmakers -- three Germans, one Portuguese and one Spaniard -- spent four hours on board the rescue ship Lifeline, as they negotiated with Italian and Maltese authorities for permission to dock, according to the vessel's German operator, a non-governmental organization also called Lifeline.

The ship has been in limbo for five days after picking up hundreds of migrants off the Libyan coast on Thursday and being refused permission to dock in both Malta and Italy.

It is currently stranded 24 miles (38 kilometers) off the Maltese coast with 234 migrants and 17 crew members on board.

The parliamentarians are urgently seeking permission for Lifeline to dock within the next 48 hours, as conditions deteriorate on board and the weather is expected to worsen, according to Ruben Neugebauer, spokesman of the German non-governmental organization Sea Watch which is also helping coordinate the mission.

The ship has enough water, food and fuel to reach Malta and Italy, he added.

One of the MPs on board, Michel Brandt of Germany's Left Party, described the conditions as "unbearable" and said migrants "need medical care." He posted images on his Twitter account of people huddled under blankets on deck.

Situation auf der #Lifeline brenzlich: Morgen kann das Wetter umschlagen, dann ist das Leben der Gäste nicht mehr garantierbar. Es muss HEUTE eine #Lösung her. Wir fordern die #Bundesregierung auf, sofort Kontingente für diese Menschen zu schaffen. #DieLinke pic.twitter.com/l3SfUjO36U — Michel Brandt (@michel_brandt_) June 25, 2018

German Green Party MP Manuel Sarazin, who was also on board with fellow party member Luise Amtsberg, said in a tweet that the situation was "unsustainable" and "dangerous with bad weather."

Wir sind auf der #Lifeline, die seit 4 Tagen vor Malta ausharren muss mit rund 230 Menschen an Bord. Die Lage an Bord ist untragbar wird mit schlechtem Wetter gefährlich! Wir brauchen schnell eine Lösung für diese Menschen, einen sicheren Hafen. @SEENOTRETTUNG @seawatchcrew pic.twitter.com/1UDWzL7x0f — Manuel Sarrazin (@ManuelSarrazin) June 24, 2018

Also on board was Portuguese MEP João Pimenta Lopes, of Portuguese Communist Party (PCP), who in a video posted on his Facebook page said the migrants hailed from several African countries, including Nigeria, Somalia, Sierra Leone, Eritrea, Sudan and Chad.

"In their majority are men, very young men, 77 of which under 18 years of age," said Lopes. He added that there were also 14 women and four children on board.

It is unclear who the Spanish MP who went on board was.

It is the second instance this month of a rescue ship being forced to drift for days on end in the Mediterranean as Italy and Malta wrangle over responsibility. Just weeks ago, the Aquarius, which was carrying more than 600 migrants, eventually docked in Spain after Italy's new hardline interior minister and leader of the anti-immigration League party, Matteo Salvini, refused to allow the ship to dock.

Migrants huddle on board the Lifeline in the early hours of Monday.

Salvini seems to be maintaining his tough stance. In a Facebook live last week he warned the Dutch-flagged ship operated by the German nongovernmental organization Lifeline not to dock in Italian ports, and even suggested it continue to "carry this human load to the Netherlands."

The Permanent Representation of Netherlands at the EU rejected this suggestion, instead tweeting that the ship was owned by a German NGO.

On Sunday, Lifeline also hit back at Salvini, saying in a Twitter post "Dear @matteosalvinimi, we have no meat on board, but humans. We cordially invite you to convince yourself that it is people we have saved from drowning."

Blame game continues

Malta's Prime Minister Joseph Muscat said in an interview on Malta state television TVM on Sunday that "we are in a situation that if we don't take decisions in the coming days, the situation will escalate."

Yet he appeared determined not to allow the Lifeline to dock in Malta, saying in a government statement that the rescue had taken place in the Libyan rescue zone and been coordinated by the Italian and Libyan authorities.

Given these circumstances, Malta is under no obligation to take in the ship, he said, even though the vessel is in the Maltese rescue zone.

That said, Malta has twice given food and drink supplies to the stranded ship, Malta's Ambassador to Italy, Vanessa Frazier, told CNN.

Immigration continues to be a controversial issue for EU member states, with no clear resolution in sight. At an informal EU summit on immigration in Brussels on Sunday, German Chancellor Angela Merkel appeared keen to manage expectations that European leaders could reach a broad agreement on migration.

Countries will need to work on bilateral and trilateral deals with one another instead of waiting for all 28 EU member countries to reach an agreement, Merkel told journalists.

Cargo ship Maersk also stranded

Meanwhile a second vessel, a cargo ship operated by Danish transportation company Maersk, is also stranded in the Mediterranean after picking up 113 migrants off the coast of Libya on Friday morning, and being refused permission to dock in Italy.

The cargo ship had been traveling between Libya and Malta when the Italian Maritime Rescue Coordination Center (MRCC) called on it Thursday evening to rescue the migrants, Maersk said in a statement.

Under international maritime laws , the cargo ship was obliged to assist. But it has been left in limbo after it was denied a port of entry and the company is now "awaiting further instruction from authorities," the statement added.

A cargo ship operated by Danish company Maersk, pictured off Sicily's coast on Monday.

The ship is roughly three nautical miles from the port of Pozzallo in Sicily, Italian Coast Guard spokesman Commander Cosimo Nicastro told CNN. He added that of the 113 migrants rescued, five have since been brought to shore for medical reasons, including an eight-month pregnant woman and her partner, and a young girl who needed medical assistance with her mother and sister.

The ship had 600 containers on board, many of them empty, Maersk spokesperson Mikkel Elbek Linnet told CNN. Maersk did not know what was in the containers, however it said some were refrigerated, suggesting there were perishable goods on board.

The company added that there was enough fuel on board to keep the refrigeration going.

Salvini praises Libya coast guard

Meanwhile, Salvini met Libyan Interior Minister Abdulsalam Ashour in the capital Tripoli on Monday, thanking the Libyan Coast Guard for rescuing 820 migrants from the Mediterranean on Sunday and returning them to Libya.

Migrants rescued by the Libyan Coast Guard on Sunday.

In a Facebook post, Salvini also took a swipe at "improper interventions by NGOs."

Last year Italy adopted an aggressive approach to halting migration across the Mediterranean from North Africa, backing the Libyan Coast Guard's rescue efforts and cracking down on NGOs operating off the country's coast.

However, Human Rights Watch and other humanitarian organizations have warned against returning migrants to Libya, a war-torn country where they say migrants are exposed to torture, slavery and detention.

Desperate migrants on a deadly route

The Mediterranean remains the world's deadliest migration route, despite sharp falls in the number of people trying to reach Europe by boat. That drop is partly ascribed to a deal struck between Italy and Libya last year, in which the southern European country pledged to bolster Libya's Coast Guard so it could spot departing migrant boats and house migrants attempting to cross.