LOS ANGELES (AP) — Horizon Pharma says it is dropping its hostile bid for rival drugmaker Depomed after a judge rejected its effort to nullify Depomed's "poison pill" takeover defense.

Horizon said Thursday that while it strongly disagreed with the ruling from a California superior court judge, it is withdrawing its offer. Depomed had repeatedly rejected Horizon's overtures, saying they undervalued the Newark, California-based company.

As of Thursday, Horizon's all stock bid was worth about $1.1 billion.

Depomed in July adopted the "poison pill" measure, which can thwart takeover attempts by making them too expensive.

Dublin-based Horizon Pharma PLC makes the rheumatoid arthritis drug Duexis. Depomed Inc. has a portfolio that includes the migraine drug Cambia.

Depomed's shares rose almost 4 percent in extended trading, while Horizon's rose less than 1 percent.