Bausch & Lomb Inc. said today that it is buying Irvine eye drug maker Ista Pharmaceuticals Inc. for about $500 million in cash, or $9.10 a share.

Ista makes drugs for eye allergies and treating pain after cataract surgery, among other products. Bausch, which is based in Rochester, N.Y., and has an eye surgery hub in Aliso Viejo, said the deal’s already been approved by the companies’ boards and should close in the second quarter.

Ista recently rejected two hostile takeover bids by Canadian drug maker Valeant Pharmaceuticals International that it said undervalued the company. Valeant initially offered $314 million for Ista and later hiked that offer to $360 million.