Inocencia Perez and Gerardo Romero thought the arrival of a new landlord meant they could stop worrying about the status of their apartment, on the second floor of a Chelsea building seized by a bank through foreclosure.

But instead of newfound security, Perez and Romero — who have three young children — were unnerved when, not long after taking over, the two-decker’s buyer, City Realty Group LLC, raised their monthly rent by $300, to $1,300. The couple said they were given two options: pay up or move out.

The new owner “wants to raise the rent too much,’’ said Perez, but, “we don’t want to go.”

Through its attorney, Robert Russo, City Realty said the company is simply charging fair market rents to earn reasonable returns. “Why are we greedy if we are in to make a profit? Isn’t that what America is all about?” Russo said.

The case is now in Chelsea District Court, where Perez and Romero are fighting eviction and hoping the pressure of a costly court battle will let them negotiate a more modest rent increase of $100 or $150.

Such clashes between Boston-area real estate investors and apartment dwellers are becoming more common as the housing market mends and lenders seek to get foreclosed properties off their books.

Previously, tenants in a foreclosed apartment building would have been long gone by the time the take-back process was completed. That changed in 2010, when Governor Deval Patrick signed a law providing new protections to tenants living in foreclosed homes. The intent was to prevent evictions.

City Realty owner Fred Starikov said he and his partner, Steve Whalen, are responsible landlords pumping money into hundreds of housing units in financially troubled neighborhoods that many others avoid. He said Perez and Romero’s unit could rent for up to $1,800 a month on the open market.

“We can’t let everyone stay for the rent they wish to pay. That is not a sustainable model,’’ said Starikov. “They have the right to leave.”

Housing specialists said the participation of private investors is crucial to turning around low-income neighborhoods hollowed out during the foreclosure crisis — they can often complete deals and get renovation work done faster than nonprofits, which typically have less cash and face more bureaucratic tangles.

“If you want these guys to make investments, if they are going to get a decent return, the rents are going to have to go up,’’ he said. The center is currently studying the effects of investors on foreclosed properties in four cities, including Boston.

“You don’t want to gouge. You do have to have enough rental stream,” Herbert said. “It is a hard sweet spot to find.”

But a growing group of tenants and housing advocates say City Realty and other investors are buying bank-owned properties at bargain-basement prices, making few or no repairs, and unjustly raising rents. The result, they said, is that low-income tenants who have long lived in neglected properties are being displaced.

Between 2007 and 2012, 44 percent of foreclosed properties in Suffolk County — about 2,063 units — were purchased by investors, according to new research by the Federal Reserve Bank of Boston. According to the Fed, City Realty and its subsidiaries make up one of the largest real estate investment groups in Suffolk County, which includes Boston, Chelsea, Revere, and Winthrop.

Few would argue that managing rents in formerly foreclosed buildings that are still occupied poses challenges for new landlords. In some cases, former owners walked away from their properties and foreclosing banks didn’t bother to collect rent. That means some residents are being asked to write rent checks for the first time in months, or even years. Collecting the money isn’t always easy.

“Buying properties with tenants in them can be a real horror show,’’ said developer Stephen Chaletzky, owner of Dorchester-based Hearthstone Corp. In one case, he said, it took almost two years to remove tenants who refused to pay rent. As a result, Chaletzky said, he now only considers buying buildings that are vacant.

Sheila Dillon, director of Boston’s Department of Neighborhood Development, said rents in formerly foreclosed homes have risen at a slower rate over the last several years than those in more stable parts of the city. Median rents in Boston’s most desirable sections have reached $2,875 a month, among the highest in the nation, according to the city.

For lower-income tenants, Dillon said, even an incremental rent increase can create hardship. She said the city offers them assistance through legal services and education about housing rights, and — in some cases — by helping them find more affordable places to live.

“Some don’t have the income for market-rate rents,” Dillon said.

In an effort to help keep housing costs manageable for tenants living in foreclosed homes, a coalition of public and private groups recently launched a two-year plan to buy 30 foreclosed housing units occupied by renters or former owners in Dorchester’s Four Corners neighborhood.

The group, Coalition for Occupied Homes in Foreclosure, is working with a private developer, Citibank, the City of Boston, and others to purchase such homes and sell them to a nonprofit owner.

“Our main goal is to stabilize the community by stopping displacement of folks living in foreclosed properties,” said Maureen Flynn, the group’s coordinator.

David Grossman, director of the Harvard Legal Aid Bureau at Harvard Law School, said volunteers are helping tenants fend off evictions weekly at housing court in Boston — and often find themselves battling City Realty.

“They are two guys trying to get rich off the backs of poor people,” Grossman said of the co-owners.

Last month, members of City Life/Vida Urbana, a nonprofit housing advocacy group based in Jamaica Plain, and the nonprofit Chelsea Collaborative’s City-Wide Tenant Associationprotested outside of City Realty’s Brighton offices.

Eliza Parad, who heads the Chelsea association, conceded the company has the right to increase rents, within reason. But some tenants have been hit by monthly increases of between $250 and $400 in a city where poverty is serious problem.

Perez and Romero, who have lived for about five years in their Chelsea apartment, said they have always paid rent. But living on Romero’s salary — which comes from cleaning houses and landscaping work — is a constant struggle.

Despite the strain, Perez said, the family plans to stay. They like the neighborhood, she said, and moving the children to another school would be disruptive. “We want to come to an agreement’’ with City Realty, she said. “We will stay here until a judge tells us to leave.’’