The United Kingdom has become the main delivery partner of the 2019 Pan American Games in Lima after an agreement was signed by the British and Peruvian Governments.
The deal, due to continue until the end of the event in two years, will see a team of experts from the UK work closely with the Organising Committee to ensure the successful staging of the competition.
Severe flooding and financial difficulties in recent months had plunged Lima's hosting of the Games into doubt.
The agreement, signed by International Trade Minister Greg Hands, has been described as "fundamental to our progress in successfully organising and delivering the Lima 2019 Games" by Organising Committee President Carlos Neuhaus.
It will help the South American nation "deliver the infrastructure and organisation of the Games on-time and on-budget", according to a joint statement from the two Governments.
The Peruivan Government set the budget last October at $1.2 billion (£935 million/€1.1 billion)
UK companies are now set to secure contracts in areas such as event management, security and construction under the deal, signed as part of the Peruvian Government's special project for the planning and development of Lima 2019 and the UK’s Department for International Trade.
"The bilateral arrangement was signed within an international cooperation framework which will enable Peru to carry out a successful edition of the Pan American Games and leave a lasting economic, social, urban, and sporting legacy," the statement said.
Peru was rocked by devastating floods last month and the death toll now stands at over 110.
More than 800 towns and cities were declared as a state of emergency due to a shortage of food and water, while over 60,000 homes in 24 out of Peru's 25 states have been destroyed.
It led to increased calls for the money allocated for the Pan American Games, scheduled to be held from July 26 to August 11 in 2019, to be redirected towards the relief effort and prompted suggestions the event should be moved elsewhere.
The damage and devastation caused by the floods also sparked speculation this year's International Olympic Committee Session, due to be staged this year from September 13 to 17, would be taken away from the Peruvian capital.
Last week, the IOC confirmed the event would remain in Lima.
"This arrangement with the UK government is fundamental to our progress in successfully organising and delivering the Lima 2019 Games," said Neuhaus.
"We are thrilled to be working in close collaboration with our British partners, benefitting from their extensive expertise to make the Lima 2019 Games a success."
The Peruvian Olympic Committee also missed a deadline to make an outstanding payment of $3.3 million (£2.6 million/€3.1 million) to the Pan American Sports Organization (PASO) in January.
The deal with the UK Government appears to have eased concerns, with Britain claiming to have "proven experience in organising and delivering successful global sport events whilst leaving a positive legacy for host cities and countries".
"Since the Sydney [Olympic] Games in 2000 the UK has been involved in every major global sporting tournament offering support in areas like construction, transport and event organisation," said Hands.
"This new agreement will deliver that world-leading expertise to help make the Lima 2019 Games a success, creating opportunities for UK companies and a lasting legacy for the Peruvian people as we did at London 2012."
British Ambassador to Peru, Anwar Choudhury, described the agreement as a "significant milestone" for the two countries.
"We are in this together, as friends and as long-standing partners," said Choudhury.
"Through our support and expertise, we are confident we can make the Lima 2019 Games a tremendous success and leave a lasting legacy for Peru, just as the 2012 Olympic Games did in London.
"Knowledge transfer is also part of the bilateral arrangement.
"The team of British experts has an accumulated experience of over 100 large sporting events, including the 2012 Olympic Games in London, to help the Special Project ensure effective time-management and quality delivery of the Lima 2019 Pan American Games."
Over 5,000 athletes are expected to compete at the 2019 edition of the Pan American Games in 36 sports.
Lima were comfortable victors in the ballot for the event, winning in the first round with 31 votes in 2013.
La Punta in Argentina and Santiago in Chile both received nine, with Ciudad Bolívar in Venezuela receiving eight.