When the Bridgewater Commons shopping mall opened right across Route 22 in the 1980s, the prognosis for downtown Somerville was bleak. One by one, the clothing, shoe and jewelry stores on Main Street began to either move to the mall or close.

But the town’s leadership at the time was far-sighted, imposing an unpopular tax on downtown property owners to fund improvements to the shopping district aesthetics — new lampposts, pavers on the sidewalks and wrought-iron railings around the trees and planters.

“We had to do something or we’d just fade away and die,” said community activist Rich Reitman, who owns a public relations firm in town. “What was needed was a big splash. Our initial move was to do the streetscape, make the town look better.”

He said the mayor at the time, Michael Kerwin, the borough council and the planning board went to work. They set aside some money for marketing and hoped for the best.

“We guessed that it would be antiques and food, and we were right,” Reitman said. “Businesses come and go, but the vacancy rate is low.”

That groundwork provided the setting for the new downtown Somerville, with scores of restaurants, specialty stores and posh shops.

What kind of food are you looking for? There’s Thai, Indian, Cuban, Greek, Korean, Mexican, French, Japanese and, of course, Italian, and many more. There are coffee houses and bakeries, a brewpub is coming, and there are enough taverns to do a respectable crawl.

A recent improvement was to make too-narrow Division Street, which connects Main Street to the train station, into a pedestrian mall. Sweet shops; restaurants (the empanadas at Division Street Café have been highly rated); an art gallery; and Yestercades, a pinball and video game arcade, now line the street, where events such as the arrival of Santa Claus, summer movies and all sorts of entertainment take place. There’s even been a wedding there. The nonprofit Arts on Division was created to provide programs.

The town continues to be event-oriented, with two annual street fairs, parades, holiday-themed celebrations and the Tour of Somerville bicycle races on Memorial Day, which attract thousands of spectators. Main Street hosts classic cars every Friday evening during the warm months, drawing couples and families to see the cars and eat out.

All of this excitement has spurred a lot of construction of apartments and condos, as new residents take advantage of the amenities and the mass-transit links to Newark and New York.

Somerville is now a destination for food and fun, and the upward trend doesn’t show any signs of stopping.

Kerwin, who now heads the Somerset County Business Partnership, stressed that a new playbook is needed to sustain Somerville’s success.

“Let’s get the word out to really make it a destination place,” he said, calling Somerville “a small town with a big downtown.”

“There’s an authentic sense of place,” Kerwin said. “It’s gold — people will be attracted to that. If you want an authentic Main Street experience, come to Somerville. Getting the word out is the key.”