Dominican-born Adriano Espaillat claimed victory on Tuesday in the U.S. congressional race to succeed longtime Representative Charles Rangel, signaling change in the historically black neighborhood of Harlem that has grown increasingly Hispanic.

Nine Democrats ran in the primary to select the party's candidate for November's general election. In a district where Democratic voters heavily outnumber Republicans, Tuesday's winner will have a virtual lock on taking Rangel's vacated seat in the House of Representatives.

Espaillat, once an illegal immigrant, would be the first Dominican-American member of Congress.

RELATED: Harlem voters to pick heir-apparent to veteran congressman

A state senator, Espaillat, held a 3-point lead on state Assemblyman Keith Wright, an African-American who was endorsed by Rangel and benefited from the political machine of a man who held the job for 46 years.

With 98 percent of polling places reporting, Espaillat had 36.7 percent of the vote compared with 33.7 percent for Wright, a difference of nearly 1,300 votes.

"The voters of the 13th congressional district made history tonight," Espaillat, 61, said in a victory speech.

"The voters ... elected a country boy from Santiago de los Caballeros in the Dominican Republic," he said, mixing Spanish and English.

Wright, however, refused to concede, telling supporters: "No candidate can declare victory tonight, not until every vote is counted."

The district is dominated by Harlem, long a leading cultural center, home to black political and commercial life, and an incubator for jazz.

Harlem notably has grown more white with gentrification, but it also has become more Hispanic. Besides Harlem, the district also includes predominantly Latino neighborhoods further to the north where Espaillat has his base.

Rangel, 86, a founding member of the Congressional Black Caucus, won his first congressional election in 1970, and since then Harlem voters routinely returned him to office every two years, even after his 2010 censure for ethics violations.

Espaillat tried and failed to unseat Rangel in 2012 and 2014 primary elections.

RELATED: De Blasio proposes election reforms after primary voting problems

Gentrification emerged as a leading issue in the campaign, as a decade-long influx of affluent people, many of them white, has transformed Harlem's once-blighted blocks of 19th century brownstone town houses.

Change has muted the distinctive black identity of the area, the home of the Apollo Theater, the Cotton Club and other monuments of African-American culture.

Once an upscale Dutch neighborhood named after the city near Amsterdam, Harlem drew African-Americans during the northward migration of former slaves in the late 19th Century and again between the world wars.

In decades past, affluent New Yorkers avoided venturing too far north, or "uptown." But soaring property values have turned Harlem into one of New York's trendiest real estate markets.