Virginia Gov. Ralph Northam (D) declared a state of emergency Tuesday in response to a cyberattack affecting operations of the Colonial Pipeline, a key source of fuel for much of the East Coast.

Some pipeline operations are beginning to be restored after a temporary shutdown, and the company says it hopes to be largely back in business by the end of the week. But anxious motorists rushing to fill up tanks have led to shortages, and a small percentage of stations in Virginia, Georgia and other states have been left with no gas to sell, industry analysts said.

“If prolonged, the pipeline closure will result in gasoline supply disruptions to various retailers throughout the Commonwealth, since the pipeline is the primary source of gasoline to many Virginia retailers,” Northam’s order read.

The attack is affecting 18 states, according to the U.S. Department of Transportation, which helps to oversee pipeline safety. The agency eased regulations on moving fuel by truck to deal with distribution bottlenecks, including allowing truck drivers to work longer hours. Federal rail officials also are helping to coordinate rail tankers as a temporary alternative to the pipeline.

Northam’s order activates Virginia’s Emergency Operations Center to coordinate the state’s response. It also allows heads of state agencies “to waive any state requirement or regulation” and enter into contracts without following normal procedures.

The state emergency declaration is set to last a month, unless it is canceled or extended.

In Maryland, Gov. Larry Hogan (R) said the state’s energy and emergency planning teams provided him with an update Tuesday on the disruptions. He urged drivers to proceed as normal.

“While the operators of the pipeline currently anticipate that the disruption is likely to be short-term, we are prepared for all contingencies,” he posted in a tweet.

Maryland is also issuing temporary permits and waivers to help keep gas flowing to suppliers, especially through the Port of Baltimore.

Federal transportation officials said Tuesday they have launched an effort that could lead to temporary and limited waivers of a 1920 federal law, the Jones Act, that regulates shipping. The Jones Act, notes the Congressional Research Service, “requires that vessels transporting cargo from one U.S. point to another U.S. point be U.S.-built, and owned and crewed by U.S. citizens,” and has spurred debates over prices and availability of ships.

The U.S. Department of Transportation said it is surveying which ships meet those requirements as officials seek to carry supplies from the Gulf to points along the Eastern Seaboard. The Department of Homeland Security is responsible for issuing the waivers if they are deemed necessary.

Ovetta Wiggins contributed to this report.