MARIEL, Cuba — The images of desperate refugees crammed onto boats have defined this bay outside Havana for decades. About 125,000 Cubans left from here in 1980 after Fidel Castro, facing growing discontent, announced that anyone who wanted to leave should just go to Mariel and get out.

But on Monday, Raúl Castro, Cuba’s president, stood alongside the president of Brazil, Dilma Rousseff, to unveil a new Mariel: a state-of-the-art port that both leaders said would lead to a new era of commercial integration, connecting Cuba and the world.

The terminal is “a transcendent project for the national economy,” Mr. Castro said, standing by towering container lifts adorned with Cuban flags. He added that the port and the adjacent development zone, where foreign companies will enjoy tax breaks and other advantages, “are a concrete example of the optimism and confidence with which we Cubans see a socialist and prosperous future.”

The Mariel upgrade, at a cost of around $900 million, is the largest infrastructure project for Cuba in decades. With financing from Brazil’s government, it amounts to one of the communist country’s biggest bets yet on global capitalism.