Bolivia's leftist president, Evo Morales, took a key step forward in his bold plan to nationalize the country's gas and oil industries on Sunday (October 29) after foreign energy companies agreed to operate in the country under state control. Major energy firms including Spain's Repsol YPF ended months of talks with the government with last-minute agreements before a deadline set for midnight Saturday, agreeing to new contracts handing over a larger share of their profits to the Bolivian state. The deals amounted to a political boost for Morales, the country's first indigenous leader, who has faced criticism for months that the process had been slow-moving and clouded with uncertainty. "Here in Bolivia, we have many economic problems, such as a historic debt going back 500 years and it is not possible to continue a kind of plunder, taking advantage of the inequality of our natural resources. Accords, contracts, agreements that allow everyone to take advantage of the economic results that come from the natural resources with equilibrium or equality, welcome," Morales said during a signing ceremony attended by company executives. A nationalization decree issued by Morales on May 1 gave foreign companies six months to negotiate new contracts handing over a majority stake in their Bolivian operations or abandon the country. Brazil's Petrobras and Spain's Repsol YPF are the biggest investors in Bolivia's oil and gas industry, controlling 47.3 percent and 26.7 percent of the proven and probable natural gas reserves in the country. Although specific details of the new contracts have not been revealed, the government has said they are designed to give YPFB more control over production and commercialization of oil and gas products. The government has also said new contracts would contain a clause requiring energy multinationals to invest part of their profits in the country's energy sector. According to the new deals, the companies will now operate as service providers to Bolivia's YPFB in exchange for between 18 to 50 percent of the revenue. Morales, wearing his trademark striped sweater, said the agreements will quadruple Bolivia's energy revenues over the next four years from a current $1 billion. He also sought to assure companies their operations would be protected by the law. He also discussed his relationship with Spain's socialist Prime Minister Jose Luis Rodriguez Zapatero. "Spain, for Bolivia, is a strategic associate. President Zapatero, is a guarantee and a hope that Europe can open the doors for us, to our country, to Bolivia. And this accord, also, has been agreed upon in friendship with this strategic associate in economics and politics," he said. The Bolivian leader insists he wants to use the energy revenue to help alleviate poverty in South America's poorest country. A major campaign pledge by Morales, the drive to assert greater state control over Bolivia's gas and oil fields has suffered a series of setbacks in recent months, including resignations of key officials, prompting analysts to say the nationalization was flailing. A lack of technical expertise and funds at YPFB also slowed the government's efforts to take over Bolivia's natural gas reserves, the second largest in South America after Venezuela's. The government had been locked in arduous talks for months ahead of the deadline, particularly with Petrobras.