Morocco's conservative Istiqlal party has won the most seats in Saturday's parliamentary elections.
Moroccans feel not enough has been done to eradicate poverty
The final results give Istiqlal (Independence) 52 seats, followed by the opposition Islamist Party of Justice and Development (PJD) with 46.
Its coalition partner, the centre-left USFP won the last election - but could only manage 5th place this time.
Istiqlal's victory means Morocco is likely to stay on its present course, maintaining close ties with the West.
All eyes now will be on the appointment of the country's prime minister, which should take place in the next few weeks.
That decision lies in the hands of the king, a sign according to critics that democracy still has its limits in Morocco, which styles itself as a constitutional monarchy.
France praised the "transparent and fair nature" of the elections, saying it confirmed "the firm establishment of democracy in Morocco".
The result is a huge surprise for Istiqlal, the secular party of independence whose political fortunes had been in the doldrums in recent years.
The PJD's leader Saadeddine Othmani is bitterly disappointed
The PJD accused the ruling secular elite of buying votes - a claim the government dismissed, though it said it would examine any evidence.
The BBC's Richard Hamilton in the capital, Rabat, says the results are a bitter disappointment for the PJD which thought it had mobilised widespread support and had expressed hopes of emerging as the largest party.
PJD leaders had visited Washington to defuse any fears that the party could harbour a secret radical agenda.
Its leaders say they are not extremists who want to create an Islamic state.
Poor but stable
Turnout was estimated at 37% of the 15 million voters, the lowest in Morocco's young democratic history.
According to government figures, slightly more than half the population of 15.5 million were registered to vote. Some 3,000 observers, including 52 from other countries, were deployed across the country.
International observers said: "(The election) was characterised by a spirit of transparency and professionalism during the entire election campaign."
Morocco has escaped the kind of unrest that plagues neighbouring Algeria, where a car bomb on Saturday killed nearly 30 people.
But many Moroccans feel the government has not done enough to eradicate widespread poverty, unemployment and corruption.
Just days ago, the US granted nearly $700m (£350m) in economic aid to Morocco.
The US is keen to encourage moderates to counter the threat posed by more extreme movements in North Africa, say political observers.