ATLANTIC CITY — Forty years ago Wednesday, voters took to the polls and approved a ballot question that brought casinos to Atlantic City, a milestone that comes less than a week before people decide on expanding gaming outside the resort.

But the road to casinos in the city was not an easy one. Bringing legalized gambling to Atlantic City started to build momentum following the 1964 Democratic National Convention at Boardwalk Hall. Lyndon Johnson had already assumed the office of president after the assassination of John F. Kennedy, so his nomination was not in doubt. Instead, the visiting reporters focused on Atlantic City’s decay.

The process of bringing gaming to the resort following the disastrous convention took more than 12 years, two public referendums and a number of legislative hearings, many featuring impassioned pleas from local lawmakers.

In 1974, the first referendum introducing casino gaming to the state failed 60 percent to 40 percent. The referendum lost in 19 of 21 counties. That referendum lacked specifics about where New Jersey casinos would be located. The public question on the 1976 ballot, which succeeded, limited casinos to Atlantic City.

For the greater part of the past four decades, Atlantic City casinos created thousands of jobs, millions in tax revenue and billions in capital investments while making Atlantic City an East Coast gambling mecca. Tourism in the city increased five-fold in the first decade. Neighboring communities, such as Egg Harbor and Galloway townships, saw enormous growth as people flocked to the region for work.

But since 2008 and the introduction of gaming in neighboring states, the city has been pushed to the brink of bankruptcy.

On Nov. 8, voters will decide whether to ap-prove as many as two casinos in North Jersey. The ballot question states the new casinos must be in separate counties and at least 72 miles from Atlantic City, where five casinos closed since 2014. It lacks details including how much the casinos would pay in taxes.