NEW YORK, Nov 7 (Reuters) - Activist investor Elliott Investment Management has built a stake in BioMarin Pharmaceutical and has been in discussions with the biotechnology company for months about its future, according to two people familiar with the matter.

The hedge fund, which oversees some $60 billion in assets, has spent over $1 billion on the stake in BioMarin, which focuses on rare genetic disorders and is valued at $14.6 billion, the sources said.

The nature of the conversations between San Rafael, California-based BioMarin and Elliott, which is headquartered in West Palm Beach, Florida, and any demands the hedge fund may have made could not be learned.

Elliott declined to comment, while a representative for BioMarin did not immediately respond to a request for comment.

BioMarin is trying to find its footing amid a change in chief executives and slow progress in the launch of its drug Roctavian to treat hemophilia.

After the company last week lowered its 2023 guidance for Roctavian, some analysts cut sales forecasts for the coming years, even though they still see the drug hitting blockbuster status of $1 billion annually in the long run.

BioMarin shares are down 24% year-to-date, significantly underperforming the iShares Biotechnology ETF, which is down 8.6%.

The share price fall has led some analysts to speculate about whether the company could become a takeover target.

Analysts noted that BioMarin's hard to manufacture therapies and that its entire portfolio is excluded from Medicare prescription drug price renegotiations could appeal to buyers.

BioMarin said last week that Jean-Jacques Bienaime, 70, who has led the company since 2005, will be replaced by veteran healthcare and biotechnology executive Alexander Hardy, currently CEO of Genentech, on Dec. 1.

"A new albeit very experienced CEO gets put in place who may explore BioMarin's strategic value more aggressively," Jefferies analysts wrote on Nov. 1.

Bienaime will keep his board seat until next year's annual meeting and remain an adviser to the company through the end of 2024. Harvey will join the board and Richard Meier, who has served as lead independent director since 2015, will become chairman, replacing Bienaime.

Elliott has previously targeted other healthcare companies including Catalent, where it settled for board seats in August, and Syneos, participating in a consortium that took the company private this year.

Elliott also successfully pushed for drug makers Alexion Pharma and Allergan to be sold. (Reporting by Svea Herbst-Bayliss; Editing by Jamie Freed)