Brazil is Latin America's largest country and the fifth most populated in the world.
It has stabilised its economy and is developing its economic and political influence on the world stage.
The BBC News website looks at the colourful nation of
The arrival of explorer Pedro Alvares Cabral in 1500 led to a legacy of Portuguese colonisation, while other parts of Latin America were mostly claimed by the Spanish.
The semi-nomadic indigenous people, who are believed to have lived in the region for about 10,000 years before the Europeans' arrival, endured slavery, violence and disease, decimating their numbers.
When the indigenous tribes failed to meet the needs of the colonists, the new land owners brought in African slaves to work the mines and plantations.
Brazil - which achieved independence in 1822 - was one of the last countries to abolish slavery, in 1888.
The abdication of Dom Pedro II in 1889 ended the short-lived monarchy, giving way to the establishment of a republic.
Republican democracy was stifled a number of times in the 20th century by coups and dictatorships.
The last period of military rule ended in 1985 and in 1989 Fernando Collor became Brazil's first democratically elected president for 25 years. He was impeached three years later on corruption charges.
In a modern tale of rags to riches, former shoe-shine boy Luiz Inacio Lula da Silva - known as Lula - became president in 2002 - the first left-wing leader of Brazil in 40 years.
Brazil stretches 4,000km (2,500 miles) from east to west and 4,300km (2,700 miles) from north to south.
The only nations larger are Russia, Canada, China, and the United States.
Brazil's natural environment, like many aspects of the country itself, is a picture of contrasts and extremes.
Total forest cover: 4.7m sq km
Deforestation: 16,705 sq km (2005-2006)
Protected: 200,000 sq km
Total destroyed: 17%
It is a map of rainforest, rivers, mountains, savannas, arid plains, coasts and beaches.
More than half the rivers and rainforest of the 6.9m sq km Amazon basin is in Brazil.
The Amazon river is the second longest river in the world (after the Nile), stretching 6,400 km and accounts for up to 20% of the total volume of freshwater flowing into the world's oceans each year.
The rainforest is home to two million species of animals and birds and unique indigenous communities.
Some estimates predict that if the destruction of the forest is not halted, it will all have disappeared by the year 2020.
Oxfam says exploitation and mismanagement of Brazil's natural resources such as gold, minerals, oil, and natural gas has resulted in serious air and water pollution and an unfair distribution of land and wealth.
Brazil has Latin America's largest economy with a GDP of $795.7bn and GDP per capita of $8,458. There has been steady growth under Lula but millions still live in poverty.
The north-east, where Lula grew up, has one third of Brazil's population and is also the poorest region. The wealth is based in the south and south-east - the cities of Rio de Janeiro and Sao Paulo and the southern areas heavily settled by European immigrants.
Decades of spiralling inflation - reaching an annual level of nearly 5,000% by the end of 1993, was curbed by introduction of the Real currency in 1994. Inflation rates fell sharply to a low of 2.5% in 1998.
Key industries are textiles, shoes, chemicals, cement, agriculture,motor vehicles and parts, other machinery and equipment. Major export products include aircraft, coffee, vehicles, soybean, iron ore, orange juice, steel, textiles, footwear and electrical equipment.
The country's current account surplus hit a record level in July 2006, indicating that exports were growing strongly. The surplus was $3.04bn (£1.6bn) in July, more than many analysts had forecast, according to the central bank.
Foreign direct investment was $1.6bn in July, compared with $1.06bn in the previous month.
Brazil is a federation of 26 states and one federal district. The states have a significant amount of autonomy of government, law, public security and taxation.
Executive power is held by the government, under the president, who is elected for a four-year term and can be re-elected once.
At the heart of the federal district is Brasilia, which replaced Rio de Janeiro as the country's capital in 1960. The city was purpose-built as the seat of power and designed to be the shape of a cross - but it turned out more like an aeroplane, with Congress located at the 'cockpit'.
Luiz Inacio Lula da Silva rose from poor shoe-shine boy to president
President Lula was elected in 2002. His victory for the Workers' Party (PT) - at the fourth attempt - put a left-wing government in power for the first time in more than 40 years.
Some thought he would take Brazil radically to the left. But the former shoe-shine boy and union leader swapped leftist rhetoric for the political centre.
He is popular among the poor but his party has been beset by corruption claims which could eat into his high poll ratings ahead of the elections on 1 October.
His main challengers are former Sao Paulo governor Geraldo Alckmin, of the centre-left Brazilian Social Democracy Party (PSDB), former PT member Heloisa Helena, of the Socialism and Liberty Party (PSOL) and former education minister Cristovam Buarque, of the Democratic Labour Party (PDT).
The central design of the capital Brasilia has the shape of an aircraft
On the international stage, Brazil is pushing for a permanent seat at the UN Security Council. It is also strengthening relations with two other major emerging economies - India and South Africa.
Frustrated by the World Trade Organization's slow progress, the trio are working to set up a free trade area they hope will eventually take in the continents they represent.
The vast country - with a population of 180 million - is also home to extreme contrasts of wealth and poverty. The richest 10% consume 46.9% of the income, while the poorest 10% get by on 0.7%, according to UN figures.
One organisation trying to redress the balance by direct action is the Movement of Landless Rural Workers (MST) which has around 1.5 million members organised in 23 states. It says 1.6% of the landowners control roughly half of the land on which crops could be grown.
Since 1985, the MST has occupied unused land where it has established co-operative farms, built houses, schools and clinics, winning land titles for more than 350,000 families in 2,000 settlements.
But rural conflicts come at a cost - with more than 1,300 people killed in the last 20 years.
Around 84% of the population live in urban environments - where poverty and violence are rife.
Many residents of the slums or shanty towns of Rio de Janeiro and Sao Paulo live with the constant threat of gun violence from heavily armed drug traffickers. More than 2,000 are killed by the police every year, says Amnesty International.
Around five million indigenous people are believed to have lived in Brazil in the 16th century. Today, there are around 350,000 Indians in Brazil in more than 200 tribes but their land, their lives and livelihoods are often threatened by mining, deforestation and disease.
Brazil's history has made it a melting pot of races and religions which has played an important part in moulding local traditions and culture.
After the arrival of the Portuguese, and then their slaves, came immigrants from across the world.
In the late 19th and early 20th centuries, Brazil attracted more than five million European, Arab and Japanese immigrants.
Around 73% of the population claim to be Roman Catholic - a legacy of the Portuguese rule - and in the Catholic calendar the period of Lent is preceded by carnival.
Brazil is famous throughout the world for its carnival celebrations - the Rio de Janeiro carnival attracting millions of tourists as well as locals out to enjoy the samba music.
The rhythmic samba beat is just one example of the legacy of slavery in Brazil. While 53.7% of the population is white, 38.5% are mixed race, and 6.2% black.
The influence can be seen in the African-influenced spiritualist religions of Candomble or Macumba. Although only around 1% claim to practise them, the festivals, which fall close to Catholic ones, are popular.
Slavery also led to the popularity of the African martial art of capoeira which slaves practised as a "dance" to hide it from their masters. With interest in Brazil growing, capoeria is also starting to find a wider audience in the West.
And how can you mention Brazil without mentioning football? The game is a national obsession and why not when the country is the most successful in the world having won the World Cup five times.