Jersey City is no longer just another gritty town on the wrong side of the Hudson River, dismissed by apartment hunters. As its population soars, new housing rises and buyers get wind of the quick train commute it offers to New York, Jersey City is shedding its dingy image and emerging as a destination of choice.

An influx of new arrivals priced out of Manhattan and Brooklyn is helping make it the fastest growing metropolitan area in New Jersey, with some 262,000 residents in 2014, up nearly 6 percent from 2010, according to United States census data. And with the inventory of available homes at a three-year low, bidding wars are driving up prices downtown, pushing newcomers farther inland. Even the city’s 38-year-old mayor, Steven M. Fulop, is leaving downtown — for a single-family house he bought last summer in Jersey City Heights, at the northern end of the city.

Developers are rushing to build, with some 7,000 units of housing under construction and another 19,000 approved — more than in any other city in the state, according to the mayor’s office.