Italy will build two centres in Albania to host tens of thousands of illegal migrants, Prime Minister Giorgia Meloni has said.
She announced the plan at a news conference with Albanian Prime Minister Edi Rama in Rome.
Ms Meloni said the centres - due to open next spring - will be able to process up to 36,000 people a year.
The plan will apply to migrants rescued at sea by Italian boats, and not to those who arrive on Italian shores.
The migrants will stay in the centres while Italy examines their asylum requests, Ms Meloni said, adding that the plan would not apply to pregnant women, children and vulnerable people.
She said the structures - which will be built at Italy's expense - would be able to accommodate 3,000 people each month "for the time necessary to quickly process asylum applications and, if necessary, for repatriation".
The centres will be built at the port of Shengjin and the Gjader area in north-west Albania. Security personnel and police officers will be provided by Albania.
Ms Meloni said that, although Albania is not an EU member state, "it is already behaving like one". She added that she believes "Albania is, for all intents and purposes, a European country" and stated her support for Albania's entry into the EU.
Speaking in Italian, Mr Rama used warm words to describe his country's relationship with Italy, saying that Italy's citizens and institutions had helped Albanians in the 1990s after the fall of the Communist regime.
"This debt cannot be repaid," Mr Rama said. "But if Italy calls, Albania responds."
Mr Rama added: "Everyone can see this is a difficult situation for Italy. Geography has become a curse for Italy, because if you arrive in Italy, you arrive in the EU. But when it comes to managing these arrivals as the EU, we know how things go."
"We might not have the capacity to be the sole solution, but we have the duty to... help Italy," he added.
Mr Rama said he and Ms Meloni discussed the migrants centre agreement while the Italian PM was on holiday in Albania over the summer.
Opposition politicians in both Italy and Albania have criticised the agreement.
Riccardo Magi, the leader of Italian liberal party +Europa (More Europe), said the plan was "frightening" and that the centres would be like "a sort of Italian Guantanamo".
Writing on X, formerly known as Twitter, Mr Magi said: "It's also an illegitimate agreement: Italy can't ship people rescued at sea to a country outside of the EU, as if they were parcels or goods."
Belind Kellici of Albania's Democratic Party criticised the the "lack of transparency" surrounding the deal.
"This is treason against Albania and it is the biggest disloyalty that Rama could do to our country," Mr Kellici wrote on X.
"The biggest anti-Albanian today is called Edi Rama, who every year expels hundreds of thousands of young people from the country to replace them with illegal immigrants."
Andrea Costa, president of Rome-based migrant aid association Baobab Experience, told the BBC that the announcement "caught everyone by surprise" and showed that the Italian government's immigration policies were "heading in the wrong direction".
Mr Costa said the centres risked becoming "like a Lampedusa in the Albanian hinterland," referring to the Italian island that is one of the main arrival ports for people wanting to reach Europe.
He also made a reference to the British government's attempt to send thousands of asylum seekers to Rwanda, saying: "We don't know if the centres in Albania will be a sort of Guantanamo, a Lampedusa, a Rwanda - or a bit of all three."
Ms Meloni, who heads the right-wing, nationalist Brothers of Italy party, is known for her staunch anti-immigration views. Since becoming PM, she has announced a string of interventions to end illegal immigration, including the detention of irregular migrants.
However, more than 145,000 migrants have entered Italy this year - 52,000 more than the same period in 2021.
In April, Italian ministers called a six-month state of emergency in response to a rise in migrant numbers crossing the Mediterranean from North Africa.