The House on Wednesday overwhelmingly passed legislation that would provide $1.7 billion to help residents of the Carolinas and elsewhere recover from recent natural disasters.

The aid was added to legislation to keep Federal Aviation Administration programs running beyond month's end. The bill passed 398-23.

Lawmakers describe the disaster aid as a down payment. They say billions more will be needed in the months ahead to help communities devastated by Hurricane Florence.

Lawmakers are working to extend the FAA's programs for five years while tackling other priorities such as disaster relief. Lawmakers sought to address several concerns of the flying public in the bill. For example, it requires the FAA to set minimum requirements for seat width and legroom on airplanes to ensure that passengers could evacuate a plane quickly in an emergency. Lawmakers were also responding to complaints about cramped seating with the directive.

"Safety should not take a back seat, especially a shrunken seat, to airline profits," said Rep. Steve Cohen, D-Tenn., who sponsored the seat legislation.

Another provision would prohibit the involuntary bumping of passengers who have already boarded a plane, a response to the public outrage over a passenger who was dragged off a United Express flight last year when he refused to leave.

Lawmakers declined to include in the final bill a provision from Sen. Ed Markey, D-Mass., to ensure that fees airlines increasingly charge passengers are "reasonable and proportional to the costs of the services provided."

Airlines raised about $7.4 billion in fees last year, mostly through baggage fees and fees for changing their flight.

Markey said the consolidation among major airlines has reduced competition, and that has allowed the airlines to increasingly rely on fees to boost their profits without fear of losing customers.

"We know that when choice goes down, fees go up. And these sky-high fees bear almost no resemblance to the cost of the services being provided," Markey said.

Lawmakers also added to the legislation a bill giving the FBI and Homeland Security officials the authority to track and down drones deemed a "credible threat" to people or federal facilities. That's something Attorney General Jeff Sessions had sought. Sessions said drones promise to strengthen the U.S. economically but "can also be used to wreak havoc by criminals, terrorists and other bad actors."

Privacy advocates criticized the provision. Neema Singh Guliani, a lawyer for the American Civil Liberties Union, said it gives the government new power to spy on Americans without a warrant and to interfere with press freedom by restricting coverage using drones. The Electronic Frontier Foundation and a press-photographers group also oppose the measure.

The Senate must also pass the bill before it can be signed into law by the president. Lawmakers are racing to address a range of issues before the end of the fiscal year. If the Senate doesn't pass the bill before then, it will need to pass a short-term measure that would keep FAA programs going.

The bill also makes changes to Federal Emergency Management Agency programs by putting more money into such things as rebuilding levees and building seawalls before hurricanes hit so that the damage won't be as severe.

"This will save lives, save money, and bend the cost curve of disasters," said Rep. Bill Shuster, R-Pa., and chairman of the House Committee on Transportation and Infrastructure.

Lawmakers from South Carolina and North Carolina had urged Speaker Paul Ryan and Minority Leader Nancy Pelosi to provide some quick relief for the states as officials assess the full scope of the damage that has occurred. At least 47 deaths have been attributed to the storm. The lawmakers described the damage in a letter to Ryan and Pelosi. They said entire communities have been isolated because of flooding that was worse than any previous natural disaster in those states.

Associated Press writer David Koenig in Dallas contributed to this report.