NEW YORK (AP) -- Shares of Air Products and Chemicals, Inc. rose Wednesday after it ditched its offer to pay $70 a share for rival Airgas Inc.

Air Products abandoned its pursuit of its smaller rival late Tuesday following a judge's ruling that Airgas' directors were within their rights to prevent shareholders from voting on the hostile takeover bid.

The Delaware Chancery Court ruled that Airgas Inc. could effectively end Air Products' takeover bid by exercising a "poison pill" provision that would have made the merger unworkable. Air Products said the ruling effectively ended its bid for Airgas.

Scuttling the deal could help both companies, Banc Capital Markets analyst Michael Sison.

"In total, we view the outcome as a positive for both names given uncertainty surrounding the takeover attempt has acted as a drag on both stocks, in our opinion, for the past year," Sison said in a note to clients.

Both companies make specialized industrial gasses. For Air Products, future growth can be driven by a generally improving economic climate that could boost orders, Sison said. That means net income could rise even without adding the market share that buying Airgas would have given the company.

For Airgas, staying independent will give the company a chance to capitalize on its dominant market position in the U.S. packaged gas market, Sison said.

In afternoon trading, shares of Air Products jumped $3.88, or 4.3 percent, to $94.10. Shares of Airgas rose 49 cents, or less than 1 percent, to $64.22.