It was like a death in the family for Brooklyn baseball fans when their beloved Dodgers left the borough behind in 1957 for the California coast.

Times were grim for Brooklyn back then. Residents were leaving en masse for the suburbs. Crime was on the rise. And there was little hope that the borough’s plight would improve.

“When the Dodgers left, it was another punch in the face to the fact that Brooklyn’s best days may not be ahead, but may have been behind us,” said Brooklyn Borough President Marty Markowitz, who was 12 years old at the time. “It was depressing.”

After decades without a professional sports team, New York City’s ascendant borough hit the major leagues again on Friday with the opening of the Brooklyn Nets’ new arena. The state-of-the-art, 18,000-seat arena will be officially christened Saturday night with a rap concert by Nets co-owner and native Brooklynite Jay-Z.

Supporters cheered Friday as the lights were turned on during a ribbon-cutting ceremony.

Developer Bruce Ratner said he was glad the arena is finally open after its completion was delayed by multiple lawsuits and by the economic downturn, and New York City Mayor Michael Bloomberg said the project has created more than 1,500 jobs.

The austere-looking arena has all black seats and metal hanging lights. The polished wooden floor has a herringbone design with the Nets’ new black and white logo in the middle.

Just as the Dodgers’ departure was a harbinger of difficult times ahead, the opening of the Barclays Center is a symbol of Brooklyn’s astonishing rise in recent years as a sought-after destination for people from all over the globe.

Basketball is now the sport du jour here, not baseball. And in a stroke of irony, the new stadium was built directly across the street from the spot where Dodgers President Walter O’Malley wanted to erect a new ballpark to replace Ebbets Field, the team’s home that was later demolished.

“When they left, that’s when I washed my hands of baseball,” said 72-year-old Fred Wilken, who was so distraught by the loss of his hometown team that he stopped watching sports altogether. “For years we supported them, we came down here. And then all of a sudden they decide to leave.”

The Dodgers were the golden thread that tied Brooklyn together in those days. The fabric of the team was woven into the neighborhood.

About two miles from the new Nets’ Arena, the hallowed ground where Ebbets Field once stood is now a massive brick apartment building in a neighborhood of Caribbean immigrants.

“We still haven’t gotten over it,” admitted Ron Schweiger, Brooklyn’s official borough historian, whose basement is stuffed with Dodgers memorabilia. “I tend to think they never moved. They’re on an extended road trip.”

Why O’Malley moved the team from Brooklyn to Los Angeles after the 1957 season was, at its core, a question of dollars and cents. O’Malley wanted the city to help subsidize the new stadium, and the city refused. Fast-forward to the present: the $1 billion Barclays Center has received millions in public money.

With its deliberately rusted steel exterior, the new arena looks like a spaceship that cruised in for a landing in Brooklyn’s busiest transportation and shopping hub. There are chain stores galore. A Modell’s sporting apparel store across the street is stocked with racks full of team apparel in the Nets’ new black-and-white color scheme and the logo designed by Jay-Z himself. Rivalry-stirring T-shirts proclaim: “New York Divided.”

The city is banking on Brooklynites’ deep-rooted sense of borough pride to win over new fans. And the championship-hungry Nets are hoping their new Brooklyn home will turn the tide for a franchise that has been largely overshadowed by the New York Knicks.

But gone are the days when sports allegiances were dictated by zip code. Brooklyn is a tight-knit borough no more: It is a deeply diverse community of many nationalities and income brackets.

Large swaths of Brooklyn are actually starting to look a whole lot like Manhattan. The borough of about 2.5 million residents draws its own share of tourists who want to stroll down Brooklyn Heights’ charming brownstone-lined streets or shop in Williamsburg’s chic boutiques.

Celebrities live in Brooklyn now. It’s home to fashionable hipsters and upscale beer gardens and well-heeled mothers pushing expensive baby strollers down the street. Brooklyn is no longer just a place to live — it’s a place to visit.

“Brooklyn had an image as the underdog upstarts, which the Dodgers exemplified,” said Henry Fetter, author of “Taking on the Yankees: Winning and Losing in the Business of Baseball.” ”I think Brooklyn no longer has that image. And the Nets don’t necessarily exemplify that.”

At the end of the day, as the wins pile up, the fans will follow. A new generation of Brooklyn children will grow up with the Nets, just as their grandparents and great-grandparents grew up with the Dodgers. But fans are a more fickle species nowadays.

A group of young men shooting hoops across the street from Ebbets Field Apartments vowed to remain loyal to the Knicks, despite being born and raised in Brooklyn.

“If they had Dwight Howard, they would’ve been the team of New York,” said 23-year-old Mario Volcin. “They would’ve been the best team of New York. The Nets don’t really have enough pieces.”

In a winner-take-all kind of town, being second-best just doesn’t cut it. And as any Dodgers fan would tell you, old loyalties die hard. But even the old-timers are willing to give this new team a chance.

“I can’t see this as atonement. Too many years have gone by for that,” said Schweiger, the historian. “But I definitely intend to go to a bunch of the games. In fact, I already have a Brooklyn Nets T-shirt.”