Benrahma, 25, joins on loan for £5m but the Hammers have an obligation to make the transfer permanent for £20m, with a further £5m possible in add-ons.
He completed the first part of his medical on Thursday but an issue had arisen, which was resolved in time for the deal to go ahead on Friday.
Benrahma said he had joined a "massive" and "historic" club in West Ham.
He added: "I like this prospect [of playing in the Premier League]. I play football to enjoy myself first and foremost, but it's always enjoyable to know you're joining the most-watched league in the world, so I am definitely looking forward to showing what I can do.
"West Ham is a historic club, which has been in the Premier League for a very long time. It included and still includes good players. It is a massive club in England."
Manager David Moyes said: "We have been looking to bring in players who are hungry and determined to progress and get better.
"Said is an exciting talent with a lot of ability and the right qualities, who will complement the other attacking players we have at the club."
Need a VPN? Or seeking to switch? Then support Tribal Football by clicking here to sign up with our official partners NordVPN. Not only will you receive the best VPN experience, but also great discounts by signing up via Tribal Football. Thanks for your support!