For years "Lula" was a dirty word at Brazil's main stock exchange, the Bovespa in São Paulo.

The mere mention of the fact that Luiz Inácio Lula da Silva, former union-leader and once a ferocious anti-capitalist, had his eyes on the presidency was enough to send shivers through international markets. In the lead up to Lula's historic 2002 election, Brazil's currency plummeted as overseas investors fretted over what the country's first working-class president might do to their balance sheets.

Times have changed – and Lula knows it. "Ten years ago I'd walk past the [stock exchange's] front door and people would shake with fear. They'd say, 'Where is that capitalist-eater going?" Lula joked last Friday, as he returned to the Bovespa to unveil the largest share offer in world history: the sale of $70bn (£45bn) worth of shares in the Brazilian energy group Petrobras.

"[But] now that very same 'capitalist-eater' … [is] taking part in this most positive moment for world capitalism. Never before in the history of man have we had a capitalisation of this size," the president boasted.

New Brazil

The unprecedented Petrobras flotation aims to help bankroll a massive offshore exploration project that may propel Brazil into the premier league of global oil producers. But the offering is also the clearest example of what Brazilians are calling the "new Brazil", a booming, investment-friendly South American nation that they believe is steaming towards a future of prosperity and global clout.

"It didn't happen in Frankfurt, it didn't happen in London and it didn't happen in New York," Lula beamed last week. "It happened in São Paulo."

Maurício Borges, business director of Apex, Brazil's trade and investment promotion agency, says Petrobras's mammoth offer is symbolic of a growing foreign interest and faith in his country – something the Central Bank hopes will lead to about $30bn of direct foreign investment this year up from just $10bn in 2003, the year Lula took office.

"The capitalisation represents the global recognition of the potential of Brazil's markets," said Borges, whose Brasilia-based organisation has operations in Beijing, Dubai, Miami and Moscow, plans a further base in the Angolan capital Luanda and recently opened an office in Brussels. "Brazil has a solid economy, a solid political [structure] and this creates confidence.

"It's not arrogance, but you notice a better understanding of Brazil and a recognition that Brazil is going through a very solid moment," Borges said of his frequent trips abroad to promote business opportunities. "[Foreign investors] have realised the potential that exists for investments here – and the potential for returns."

In Brazil hardly a day goes by without further proof of the country's rise: record fuel sales, record government spending, record levels of consumption and income. The finance ministry expects gross domestic product (GDP) to rise by 6.5% this year and average 5.7% over the coming years. Last week unemployment levels hit a record low of about 6.7%, according to the Brazilian Institute of Geography and Statistics, while the government says an estimated 25 million Brazilians have moved into the middle class since 2002 and that the proportion of people living in extreme poverty fell from 12% to about 4% between 2003 and 2008.

"Brazil managed to come out of the [world financial] crisis well," said Fernando Puga, head of the area of economic research at Brazil's development bank, the BNDES, pointing to booming internal consumption, partly the result of expanded credit lines during the crunch.

Even José Serra, the opposition candidate in the forthcoming presidential election, has been forced to admit that, under Lula, there has been progress. However, he implies the country's rise could be even more meteoric under him, employing the campaign slogan: "Brasil pode mais" ("Brazil can do more").

In a nation often described as the eternal "country of the future", the outlook was not always so rosy. Rampant inflation and ballooning foreign debt meant Brazil spent much of the 1980s and 1990s being viewed as a terminal under-achiever. Between 1984 and 1994 the country did "everything wrong that a country could do wrong", said Eike Batista, Brazil's richest man.

Then came the Plano Real (Real Plan), a daring economic initiative that tamed inflation and implemented much-needed reforms that began putting Brazil's finances in order. Fernando Henrique Cardoso, then finance minister and one of the plan's promoters, went on to rule Brazil from 1995 to 2002 and is widely credited with laying the ground-work for his country's renaissance.

After Cardoso came Lula, a former lathe operator and leftwing firebrand whose orthodox fiscal policies and business-friendly approach – his vice-president, José Alencar, is Brazil's richest textiles magnate – surprised many analysts and has transformed him into a darling of Brazilian business community, with approval ratings that hover close to 80%.

Batista said Lula had "fully understood modern capitalism". "We are extremely lucky that Brazil did not fall into our neighbours' populism."

Political and economic stability have led to a growing influx of foreign investment. Direct foreign investment rose from 43% to 72% of GDP between 2001 and 2009, according to the finance ministry. This month South America's largest oil industry expo, Rio Oil & Gas, attracted a record number of foreign companies, all seeking opportunities in Brazil's burgeoning oil and gas sector.

And with the World Cup and Olympics on their way across the Atlantic, British businesses are among those waking up to Brazil's growing potential. The business secretary, Vince Cable, recently led a caravan of 26 British firms to Brazil, while further high-profile visits are likely next year.

Cable told O Globo newspaper: "I have to be sincere and say that our relations have not been as deep as we would have liked. But I want to make it clear that for the United Kingdom, Brazil is considered high priority."

Japan, South Korea and, increasingly China, are several steps ahead. Daniel Manucci, head of the Brazil-China chamber of commerce in the city of Belo Horizonte, a major focus of Chinese investment, said Brazil had leapfrogged the US to become the third biggest destination of foreign investment in 2010, partly due to Beijing's growing interest. "Chinese investments in Brazil are set to rise by 18,000% in 2010," he claimed, citing central bank figures.

Old Brazil

Batista, the best-known entrepreneur in Brazil, has been one of the men to profit most from Brazil's recent take-off and the growing levels of foreign investment. He has attracted billions of dollars of foreign investment to his mining and infrastructure companies and is looking to sell interests in several offshore oilfields for more than $7bn.

"We are today the United States of the 1950s," he said. Asked what his message to European businesses would be, he replied: "Come! It's the time to make your bets on a country with 200 million consumers [and] with the perfect demographics for the next 10 years. This oil story is a 30-year growth story."

Education standards lag well behind those in China and Russia, while much of the country's infrastructure is creaking. Ports are rundown and with Brazil's new middle class increasingly taking to the skies, airports are being stretched to breaking point. A 2007 study by the transport confederation found that 74% of Brazilian roads were in "terrible or bad" conditions. The "old Brazil" persists.

Fernando Pimentel, a leading member of Lula's Workers' Party (PT) and close ally of Dilma Rousseff, the frontrunner to take over as president, said he expected the next government to tackle such problems head on. "Dilma has a great concern with infrastructure problems – energy, transport, sanitation and education, an area in which we still lag behind the first world," he said.

Apex's Borges predicts "massive" investments in infrastructure in coming years, providing further chances for foreign companies in Brazil. "Over the last few years investors have continued strengthening their positions [here] – the Japanese, the Dutch, the Americans, the British and the Germans," he said. "They will keep coming."