Irvine-based drug maker Allergan Inc. said that it will buy Map Pharmaceuticals Inc. for $958 million. Allergan and Mountain View-based Map are working on Levadex, an inhalable treatment for migraine headaches.

Allergan paid $60 million for the rights to co-market Levadex for certain uses two years ago.

Map now is seeking Food and Drug Administration approval for the drug.

Allergan’s stock was down 1% to a market value of $31.4 billion in midday New York trading.