The United Steelworkers union representing 30,000 U.S. oil workers reached a tentative deal on a four-year contract with Royal Dutch Shell Plc that may end a nationwide strike that has lasted more than a month.

The proposed deal includes annual wage increases and maintains the cost-sharing ratio of the union’s current health-care plan, the United Steelworkers said in a statement on Thursday. It also contains language addressing the USW’s concerns about worker fatigue and performance of routine maintenance by contractors rather than union members.

The accord could end a strike at U.S. plants that began on Feb. 1 and has spread to sites accounting for almost 20 percent of the country’s refining capacity. It’s the first national walkout of U.S. oil workers since 1980, when a work stoppage lasted three months. The USW represents workers at plants that together account for 64 percent of U.S. fuel output.

“We salute the solidarity exhibited by our membership,” Leo Gerard, the USW’s international president, said in the statement. “There was no way we would have won vast improvements in safety and staffing without it.”

The agreement will boost U.S. oil workers’ wages 2.5 percent in the first year and another 3 percent in the second third years followed by a 3.5 percent increase in the fourth year, Shell said in an e-mail.

“We are glad to have found common ground and get an agreement in place,” Shell’s vice president of manufacturing, Aamir Farid, said in the e-mail. “It’s been a challenging time on both sides of the picket line. Now, as teams come back together, let’s welcome everyone back with care and respect.”

Wayne Ranick, a USW spokesman in Pittsburgh, said by e-mail late Thursday that the work stoppage would continue until the national contract is ratified by union membership. The USW said about 6,550 people were on strike as of Thursday.

The deal comes after the USW, which has workers at more than 200 U.S. refineries, fuel terminals, pipelines and chemical plants, rejected seven previous offers from Shell, which is negotiating on behalf of employers including Exxon Mobil Corp. and Chevron Corp.

Gasoline futures for April delivery sank 0.4 percent to $1.8024 a gallon in electronic trading on the New York Mercantile Exchange at 1:10 p.m. Singapore time.

“Rumors of an agreement already put downward pressure on the market today,” Phil Flynn, senior market analyst at the Price Futures Group in Chicago, said by phone on Thursday. “The reaction tomorrow will be very tempered. The market’s already priced it in. They paid due respect today.”

The walkout began on Feb. 1 with: Tesoro Corp.’s plants in Martinez and Carson, California, and Anacortes, Washington; Marathon Petroleum Corp.’s Catlettsburg complex in Kentucky and Galveston Bay site in Texas; Shell’s Deer Park complex in Texas and LyondellBasell Industries NV’s Houston plant.

Workers at BP Plc’s Whiting, Indiana, and Toledo, Ohio, refineries joined the work stoppage a week later. And late on Feb. 20, the USW expanded it to include Motiva Enterprises LLC’s Port Arthur, Texas, refinery, the nation’s largest, as well as its refineries in Convent and Norco, Louisiana. Motiva is a joint venture between Shell and Saudi Arabian Oil Co.

United Steelworkers members operate units, perform maintenance and work in labs at the refineries. The work stoppage also covers a Marathon cogeneration plant in Texas and two Shell chemical plants in Texas and Louisiana.

The USW and Shell began negotiations on Jan. 21 amid the biggest collapse in oil since 2008, driven largely by surging output from U.S. shale formations that cut prices by 49 percent in the second half of 2014.

Refiners in the Standard & Poor’s 500 have almost tripled since the beginning of 2012, when the steelworkers last negotiated an agreement. Marathon and Tesoro went on that year to take their place among the 10 best performers in the S&P 500 Index.

The national agreement, which addresses wages, benefits and health and safety, will serve as the pattern that companies use to negotiate local contracts. Individual USW units may still decide to strike if the terms they’re offered locally don’t mirror those in the national agreement.