SANTA TERESA, N.M. (AP) — Two U.S.-Mexico border communities in New Mexico are locked in a legal fight that may result in the creation of a city — or the expansion of an old one.

A New Mexico appellate judge ruled last week that residents in the wealthy, unincorporated area of Santa Teresa, New Mexico, can continue efforts to create a municipality, KVIA-TV in El Paso, Texas, reports .

The ruling comes as Santa Teresa residents are trying to fight a plan by the nearby poorer city of Sunland Park, New Mexico, to annex their community.

"We believe that we have the right to be our own city," said Mary Gonzalez, president of the provisional government of Santa Teresa. "We have the right to have our own voice and be noticed."

But the battle is not over: Santa Teresa must now have a new hearing with county commissioners, according to Dona Ana County Manager Fernando Macias.

"There is no final resolution at this time," Macias said.

"They have to conclusively prove that the city of Sunland Park cannot provide services faster than what they can," said Javier Perea, the mayor of Sunland Park.

The push to have 5,000 residents start a city began in 2014 after a Sunland Park city councilor created a resolution to annex Santa Teresa. Two hundred residents of Santa Teresa showed up to protest, Gonzalez said.

Perea said he believes the dispute stems from a social class issue between the two communities.

According to census data, the median household income in Santa Teresa is more than $40,000. In Sunland Park, it's less than $29,000.

There are close to 5,000 people that live in the unincorporated community of Santa Teresa and 16,000 that live in Sunland Park.