CACERES, Brazil (Reuters) - For the first 500 years of Brazil's history, pretty much anything that wanted to cross its borders could do so in relative peace, whether cattle, Indians or intrepid explorers.
That era is now drawing to a close. Brazil's economic rise is forcing it to deal with a problem it long regarded as the sole concern of rich countries like the United States: the need to secure its borders and slow down a flood of drugs, illegal immigrants and other contraband.
President Dilma Rousseff, under political pressure from a crack epidemic in Brazilian cities, is spending more than $8 billion and overhauling Brazil's defense strategy to tackle an issue that has implications for trade, agriculture and the overall economy.
Brazil's prosperity has created a new consumer class of tens of millions of people who happen to live right next to the world's three biggest producers of cocaine: Colombia, Bolivia and Peru. Brazil is now the world's No. 2 cocaine consumer, behind only the United States, according to U.S. government data. It is also a booming consumer of marijuana, ecstasy, and other narcotics.
Rousseff's attempt to choke the flow of narcotics could mean big money for companies from Brazilian aircraft maker Embraer, which plans to make a new line of unmanned drones to patrol the border. Foreign firms like Boeing, Siemens and others stand to gain.
Securing an area that is five times longer than the U.S.-Mexico border, winding through more than 10,000 miles of Amazon jungle and 10 different countries, is proving to be a huge challenge. It is also sparking debate about whether it's really worth the money and effort.
For Rafael Godoy de Campos Marconi, a police lieutenant at a lonely border checkpoint in the snake-infested Pantanal wetlands in western Brazil, the task can seem hopeless.
Marconi's unit is responsible for patrolling a 125-mile stretch of border with Bolivia, the source of about 80 percent of the cocaine consumed in Brazil. On any given day, Marconi believes there are dozens of smugglers sloshing their way through his turf, with drugs stuffed into their shoes, pants and underwear.
The problem? Marconi usually only has 10 to 12 men to cover all that territory. Two weeks had passed since their last bust.
"Oh, they're out there," he sighed, scanning the horizon, sweating in the 100-degree heat and humidity. "But there are so few of us that they know exactly where we are." Even with double his current resources, he said, it would be "very difficult" to control a region so deep in Brazil's interior. With a wry smile, he mentioned a solution that was on the lips of a number of Brazilians here.
"Maybe if we built a wall, like the United States has (with Mexico)," he said. "Maybe then we can slow these people down."
Brazil won't be building any walls. But it is trying to absorb other lessons from the United States, and leaning on Washington for resources and technical advice. The head of Brazil's armed forces traveled last year to El Paso, Texas, along the Mexican border, to meet with U.S. military and Department of Homeland Security officials.
Brazil's new emphasis on its borders, and the obvious subtext - that it regards its neighbors with a growing wariness - is starting to prompt the kind of resentment around South America that used to be reserved for a certain large, English-speaking country to the north.
"It pains me to say it, but I've heard people say we're the new gringos," said Pedro Taques, a senator from Mato Grosso state, which borders Bolivia. "Controlling the border is a problem that Brazil never thought it would have to face ... and it's forcing us to do some uncomfortable things."
Nonetheless, Taques said that improved border protection was "critical" to the health of Brazil's economy and society, and he expressed frustration that results have not come faster more than a year into Rousseff's presidency. "Until now, we've seen lots of speeches," he said. "But people who live on the border aren't seeing enough results."
It wasn't so long ago that nobody took Brazil's borders seriously - not even its presidents.
Fernando Henrique Cardoso wrote in his memoirs of taking a vacation to the Pantanal as president-elect in 1994, and wandering into Bolivia by mistake. Cardoso, his wife and a bodyguard were stopped an hour later by an armed Bolivian soldier who demanded to see their IDs. They had none.
"It took a good half hour of explaining, soothing and pleading, but we finally managed to convince the Bolivian soldier of my identity," Cardoso wrote. "He said ... we were the first people he'd ever had to stop from crossing the Brazilian border, then apologized if he had scared us with the gun."
There was historically little reason for protection on either side. Brazil has not gone to war with any of its neighbors since 1870. And for most of its history, hyperinflation and political instability meant that Brazil's economy was merely average by South American standards. So, few people came looking for work.
That all began to change around the time Cardoso took office. Investor-friendly policies and poverty-reduction programs since then have made Brazil a star performer amid a broader shift in the global balance of power toward emerging markets. Brazil surpassed Britain last year as the world's sixth-biggest economy, and it is now richer than all but three of its 10 neighbors on a per-capita basis.
That dynamism, and an unusually strong currency, have lured immigrants from around South America who often earn three to four times what they do back home. More than 1.46 million foreigners were formally registered in Brazil as of July 2011 - a 50 percent increase from the previous year alone.
The flood of foreign workers has helped alleviate a shortage of skilled labor as Brazil's unemployment rate hits all-time lows. But it is also starting to cause unease, especially among the trade unions that form Rousseff's political base.
Rousseff's government vowed to toughen border controls and deportation practices in February after it gave amnesty to more than 4,000 Haitians who had entered Brazil illegally, most of them through the Amazon via Peru. The total number of undocumented immigrants in Brazil may run into the hundreds of thousands.
"Lots of these people are coming in search of the best jobs. That's the problem," said Paulo Pereira da Silva, a congressman and chief of Força Sindical, a powerful umbrella union group.
Brazil's neglect of its borders has also contributed to a deluge of cheap imports that politicians say is damaging local industry. "Countless" goods from China and elsewhere have passed into Brazil undetected through neighboring countries, Trade Minister Fernando Pimentel said in an interview.
That said, the biggest issue - the one that President Rousseff emphasized when she unveiled her borders initiative in June 2011 - is a rise in drug use and its companion, organized crime.
Sao Paulo and other big cities have seen the emergence of "cracolandias" - literally "crack lands," roving hordes of hundreds of people who gather at dusk to use crack in full view of the authorities. Media outlets have shocked the public by showing pregnant women and children younger than 12 smoking.
Drug gangs effectively control territory in several cities, including Rio de Janeiro, which will host the 2016 Olympic Games. The 2010 presidential campaign was arguably the first in Brazil's history in which drug use emerged as a major issue, piling pressure on Rousseff to respond once she took office.
"One of the main priorities for (Rousseff), going back to the campaign, is the question of combating violence and drugs," Justice Minister Jose Eduardo Cardozo said in an interview. "Controlling the borders is a critical part of that strategy."
On the front lines, though, change has been slow.
At their post 30 miles west of the town of Caceres, Lt. Marconi and his fellow policemen live in tiny, elevated metal shacks. Chickens roam about, and men in cowboy hats ride by slowly on bicycles, seemingly oblivious to the police presence.
Even though it's the only major police checkpoint in one of Brazil's biggest drug-smuggling corridors, there is no on-site X-ray machine or scanner to detect narcotics in vehicles. For inspections, cars drive up onto a brittle-looking wooden platform. Drug-sniffing dogs are deployed only rarely, Marconi said.
"This is a disgrace," said Mauro Zaque, a state prosecutor who was visiting the site. "You can't tell me the state doesn't have 2 million reais (about $1.1 million) to put a decent facility here. What's missing is political will."
The actual border is some 20 miles away. That led a visitor to ask: Can't the smugglers just go around the post?
Marconi grimaced. "Yeah, many of them seem to do that."
Authorities in the Pantanal region have detected countless "clandestine highways" - roads cleared by smugglers to get around the checkpoints. Especially elusive is the silent army of "mules" who cross over from Bolivia by foot, usually at night, and dump their cargo at covert way stations so that others can carry it to Brazilian cities. On patrol one afternoon, Marconi pointed out holes in fences on farms where he said the smugglers wriggle through.
The border itself is so poorly marked that Marconi sometimes didn't know exactly where it was, crossing at several points into what may or may not have been Bolivia. "We shouldn't stay here long," he said at one point.
This is an easy region to patrol by Brazilian standards: flat and relatively treeless. By contrast, about 6,000 miles of Brazil's border - or 60 percent of the total - is formed by rivers that flow downstream into Brazil from its neighbors, usually through thick jungle, making life simple for smugglers.
Rousseff and her senior officials say they are under no illusions about the obstacles they face.
"We can't have this outdated vision that we're going to accomplish this by placing a bunch of men in a line to protect 16,000 kilometers of border," Rousseff said upon launching the borders initiative last year. "That's not possible."
Rousseff has focused instead on solutions that make use of Brazil's existing manpower. One of her first moves was to expand the military's role, essentially giving them police powers, like the ability to stop and search vehicles within 150 km, or 93 miles, of the border.
She has also demanded full coordination between the military and Brazil's various police forces - something that never existed before. Lt. Marconi said that, in two years working on the border, he has had contact with the army only once. Apprised of this, Justice Minister Cardozo, who oversees the police, nodded grimly. "We're working on it," he said.
A new joint command center for border issues has been built inside the defense ministry. Vice President Michel Temer has begun hosting a new, regular cross-agency meeting of army and police that also brings together environmental, trade, and other officials.
The new focus amounts to a fundamental change for the armed forces, which governed Brazil as recently as 1985 and have played an uncertain, shifting role since democracy returned. Gen. Jose Carlos de Nardi, the head of Brazil's military joint chiefs, hung a photo from his visit to El Paso, right by the door in his office in Brasilia as a reminder of the new priorities.
"It's a change for us, certainly," De Nardi said in an interview. "This is going to be a core part of our strategy for decades."
Aware of the challenges faced by their men and women on the ground, De Nardi, Cardozo and others have concluded that the two biggest keys to Brazil's success will be technology and intelligence work.
One of the most effective new tools, they say, is unmanned aerial drones that are capable of detecting boats, people and even cattle - a critical element to protecting Brazil's $4 billion beef export industry, the world's largest, from devastating plagues like foot-and-mouth disease.
Latest-generation Air Force jets, ground radar systems, riverboats and other equipment will also be acquired. De Nardi said that Brazil is only beginning to get the resources it needs, and there will be plenty of opportunities for both local and foreign companies. (See sidebar.)
"We're going to need many tools," he said.
Justice Minister Cardozo said the government will double the number of federal police in the border region by 2013, in part by obliging all new entrants to the force to spend time there. Facilities such as Lt. Marconi's tiny shack will be upgraded, and a bill will be sent to Congress to provide a special salary incentive for officials working along the border, he said.
But the spending spree has left some Brazilians wondering if it will do much good, especially with regard to drugs. If the United States, with all the resources that the world's biggest economy has to offer, can't stop cocaine from coming across its borders, then how can Brazil?
Among the skeptics is former President Cardoso, who has emerged as a leading critic of the international "war on drugs." He says that, while a greater degree of border security is necessary for economic and strategic reasons, Brazil is unlikely to be able to stand in the way of the enormous demand for narcotics.
"There's no point," said Cardoso, who advocates legalizing some so-called soft drugs such as marijuana. "The experience of Latin America during the past 30 years shows that resisting these forces only yields more violence."
Indeed, Brazil is ramping up its efforts just as the countries around the region who have fought drug gangs the hardest in recent years, at enormous financial and human cost, seem to be starting to explore other alternatives.
Colombian President Juan Manuel Santos said last year that he would "welcome" legalization if it took the profits out of smuggling. His Mexican counterpart, Felipe Calderon, hinted in a September 2011 speech that he might be open to a similar move.
Colonel João Henrique Marinho, who commands the Brazilian army's Second Border Battalion in Caceres, observed that, at present, Brazilian smugglers in the border region lack anything resembling the sophistication or firepower of cartels in Mexico or Colombia. Instead, they run what Marinho described as an "artisanal" operation based on smugglers and light aircraft.
Asked why local smugglers haven't organized themselves into Mexican-style cartels, Marinho raised his eyebrows and replied: "Could it be because we're not resisting them yet?"
Concerns about drug cartels are just as keen on the other side of Brazil's borders.
In the dusty Bolivian town of San Matias, just across from Caceres, locals say that they've already seen a frightening increase in the number of criminals over the past year. But the bad guys, they say, are Brazilians.
"It's the Brazilians who run things around here," said Jose Contreras, a local shopkeeper, making a trigger signal with his index finger. "You know, the Brazilians blame Bolivians for everything, but they're the ones who rob and kill."
"They use this as a base," he said. "It's getting worse."
Justice Minister Cardozo acknowledged the misgivings about the government's strategy, as well as the possible risks. But he said Brazil will press ahead.
Rousseff has ruled out legalization of drugs, telling Rolling Stone magazine in 2010 that "society isn't ready for a change of that nature." Cardozo pointed out that Brazil has already tried what amounted to a laissez-faire approach to drug issues - with disastrous results, visible in the country's "crack lands," gang-controlled slums and elsewhere.
Asked how Brazil can succeed where the United States has not, Cardozo said that the key is "to have a relationship with those (producer) countries, so the matter can be attacked on their territory."
To that end, Brazil is starting to engage in practices that look a lot like what Washington has been doing around Latin America for decades. Cardozo said that Brazilian federal police agents went into Paraguay last year and destroyed marijuana plantations themselves with the permission of local authorities.
Cardozo said a similar program took place in Peruvian territory to eradicate coca plants - used to make cocaine - in August 2011. He also cited a new three-way cooperation agreement between the United States, Brazil and Bolivia, in which Brazilian forces will offer training and equipment to their Bolivian counterparts to fight drugs there. Felipe Caceres, Bolivia's vice-minister for social defense, said the deal will help provide his country - South America's poorest - with "logistical support to cover (our) extensive geography."
Cardozo highlighted what he called significant progress since the borders plan was launched. From June 2011 through February 2012, Brazilian security forces seized 123 tons of marijuana and 17 tons of cocaine in joint operations on the border, according to justice ministry data. More than 5,500 people have been sent to jail as a result.
The seizures have also included stolen cars, firearms, ammunition, explosive material, and hundreds of thousands of dollars in other contraband that would have otherwise made their way into the country. "It's a good start, and this is so important to protecting all sectors of our economy," said Pimentel, the trade minister.
On the front lines, some are equally hopeful.
Augusto Cesar do Borges, an official for the agricultural monitoring agency INDEA, mans a tiny, new, air-conditioned checkpoint just across the border from San Matias that mostly checks passing cars for contraband.
Prior to 2007, there was no state presence here, and "anything could enter" Brazil, he said.
"This is all new to us, and we're getting better," Borges said. "Now, we just need more tools."
"I don't know," he said with a grin. "Maybe a wall."