gas station
Texas gas stations that raised the prices of fuel during Hurricane Harvey will pay a fee for price gouging. A flooded gas station is pictured during the aftermath of Hurricane Harvey on Aug. 30, 2017 in Houston. Brendan Smialowski/AFP/Getty Images

Almost 50 gas stations in Texas accused of price gouging during the Hurricane Harvey disaster last year have agreed to refund customer's money.

During the storm that slammed the Houston area in 2017, customers were charged as much as $8.99 a gallon for gasoline. Altogether, 48 gas stations in the Dallas-Forth Worth area have been ordered to pay out $166,592 after reaching a settlement with the state, according to a statement released Thursday by the office of Attorney General Ken Paxton.

"At the outset of Harvey, I made it clear that my office would not tolerate price gouging of Texans by anyone looking to profit from the hurricane," Paxton said. "The response to Hurricane Harvey showed the incredible generosity of Texans. These settlements should teach the few who take advantage of their fellow residents to follow the law in the future."

Thirteen gas stations in Dallas, two in Richardson, two in Haltom City, three in Dallas, four in Garland and 12 in Fort Worth, as well as several other Texas-area stations were all part of the settlement, according to WFAA. Each gas station has agreed not to price gouge in the future and to pay out restitution to customers as part of the deal. Victims are being encouraged to fill out this form for a refund.

Governor Greg Abbott declared a state of emergency as Hurricane Harvey made landfall, which activated a provision of the Texas Deceptive Trade Practices Act making price gouging illegal. In the aftermath of the storm, the attorney general’s office received thousands of complaints of inflated fuel prices at gas stations, which sparked an investigation into the matter.

Hurricane Harvey caused widespread flooding and forced eight Texas refineries to close, which increased the average price of gas due to the shortages, Fortune reported. In August, about 25 percent of oil refining capacity in the Gulf Coast was knocked offline because of the storm.

Harvey made landfall in Texas on Aug. 25 and reportedly dumped about 27 trillion gallons of rain. The initial Category 4 storm displaced thousands of residents and cost over $100 million in damage.