Morocco's moderate Islamist Justice and Development Party (PJD) has won parliamentary elections, say officials.
According to provisional results, the PJD won 80 seats in the 395-seat assembly, Interior Minister Taib Cherkaoui told a news conference.
That would make it the largest party and give it the right to lead a government.
The poll is part of reforms which King Mohamed VI hopes will defuse protests prompted by the Arab Spring.
"We thank the Moroccans who voted for the PJD and we can only be satisfied," PJD leader Abdelilah Benkirane told the AFP news agency.
Mr Benkirane had earlier predicted his party would win 90-100 seats.
Under a new constitution adopted in July, King Mohamed VI must now appoint the prime minister from the party which wins the most seats, rather than naming whomever he pleases.
But the king still has the final say on issues of defence, security and religion.
Morocco's current Prime Minister, Abbas Al Fassi, said on Saturday his nationalist Istiqlal party was ready to enter into a coalition with the PJD party.
"The PJD's victory is a victory for democracy," he told Reuters.
Istiqlal's provisional tally is 45 seats, according to Mr Cherkaoui.
Mr Cherkaoui added that final results would be announced on 27 November.
The Interior Ministry said 45.4% of the electorate had turned out to vote.
About 13.5 million Moroccans are eligible to vote. Although the turnout was an improvement on the 37% who took part in the 2007 election, it was less than the 51.6% in 2002.
The pro-reform February 20 movement, responsible for the protests staged just before the king announced his plans to reform the constitution, had called for a boycott of the vote.
"This [low turnout] sends a strong signal to authorities that Moroccans are not buying the proposed reforms," Najib Chawki, an activist with the movement, told Reuters.
"We will not give up until our demands are met," he added.
The PJD hope to replicate the success of the Islamist Ennahda party in Tunisia, which won an election there last month.