Boston lost its luster as a financial capital after big national and global banks gobbled its homegrown institutions, but the city today holds increasing allure for a different breed of financial firms: suburban banks.

Banks from suburbs such as Hingham, Wellesley, and Hanover are flocking to the city, opening branches and offices beside brick row buildings in the South End, on the 20th floor of a downtown tower, and in the heart of the Financial District. Within the past two years, at least five suburban banks have launched operations in Boston and at least one more is planned for October.

Part of the attraction is the prestige and validation that a Boston address can confer on community banks. But more practically, their moves reflect the demographic shift that is swelling Boston’s population. Just as businesses followed people to the suburbs during the urban exodus of the late 20th century, so are they chasing them as the appeal of city life has returned.

“You go to where you can find or have customers,” said David Floreen, a senior vice president of the Massachusetts Bankers Association.

Boston’s population is growing faster than it has in decades, as downsizing baby boomers trade suburban Colonials for downtown condos and young workers, attracted by thriving technology and biotechnology industries, seek the amenities of urban living. In 2010, the city’s population crossed 600,000 for the first time since the 1970s, according to the census, and has since grown another 3 percent to surpass 635,000.

Perhaps more important to bankers, the city is attracting well-off, if not wealthy residents. Nearly 10 percent of households in Boston earn more than $190,000, placing them in top 5 percent of incomes, according to the census. Among major cities, only San Jose, in the heart of Silicon Valley, San Francisco, New York, and Washington, D.C., have higher concentrations of wealth.

Such statistics are not lost on banks such as Hingham Institution for Savings, Cambridge Trust Company, Brookline Bank, and Cambridge Savings Bank, which have all opened Boston offices, focusing on loans and investments. Rockland Trust of Hanover, the state’s second-largest community bank with an extensive network south of Boston, settled its wealth management and commercial loan office into a top floor office building on Arch Street earlier this summer.

‘If I ever have a need, it will be nice to have a closer location.’ — Vince Petryk, Owner of J.P. Licks, who switched to the Boston office of Rockland Trust

Wellesley Bank plans to open a branch on Federal Street in October, next to Bank of America and Fidelity Investments.

Community bank officials note that many of their clients who live in the suburbs also work in Boston and having an office nearby is helpful. In addition, it is a way to hold on to other customers who started with these banks when they bought homes and raised families, but later migrated to Boston as empty nesters, said Joe Roller, the president and chief executive of Cambridge Trust Company.

Roller himself is an example of recent trends: He moved to the South End from Sudbury five years ago. “There’s a lot of opportunity,” Roller said.

Vince Petryk, the owner of J.P. Licks, followed his loan officer from another bank to Rockland Trust two years.

He would not have necessarily thought of Rockland for his loan needs before, since the bank’s corporate offices are more than 20 miles from his Jamaica Plain base.

But Rockland Trust turned out to be the right fit for the ice-cream parlor and its expansion plans, Petryk said. And now that the bank has a Boston presence, he said he’s more likely to go to them for financial services, he said.

“If I ever have a need, it will be nice to have a closer location,” Petryk said. The Boston office should help Rockland, “enhance their reputation and status, not being just a suburban bank” and help it appeal to more businesses, he said.

The move of suburban banks into the city has also been helped by new technologies, which have allowed them to better compete with large banks. With online banking and mobile phone apps, many suburban banks can offer the convenience of large banks, even as they promote a friendlier, more personal, and less bureaucratic experience.

Many have joined an ATM-sharing network and provide reimbursements for out-of-network ATM fees, again to offer convenience similar to large, national banks with ATMs on almost every corner. “By rebating the fees, you tear down some of the competitive barriers,” said Peter Roveto, a spokesman for Brookline Bank.

It is still too early to know if suburban banks will succeed in the city. Suzanne Moot, a Milton-based banking consultant, said she is skeptical. The deposits held by even the largest community banks pale in comparison to the big national banks — Bank of America holds $1 trillion in deposits while Eastern Bank, the state’s largest community bank has $6.5 billion.

That limits the size of loans they can make; commercial clients who want larger loans or who do business internationally will still gravitate to the big banks, she said

In addition, opening just one or two branches in Boston may not be enough to make an impact, Moot said. Building a brand name in an unfamiliar market typically requires locating several branches in proximity to each other, Moot said.

“It’s going to be a struggle,” Moot said. “People don’t know these banks. The banks don’t do a lot of advertising.”

But Chris Oddleifson, president of Rockland Trust, said its recently opened Boston office has already helped it recruit employees for its wealth management unit.

Rockland does not have a retail branch in Boston, he said, but is considering it.

Rockland officials debated opening a Boston office for 20 years, but held off until the bank grew in size.

But after expanding into the northern and western communities that ring the city, it made sense to open shop downtown, Oddleifson said.

“It’s a cachet question,” he said. “The message we want to convey is that we’re a bank with size and capability.”