The December 11 snap poll was part of a European Union-brokered deal between Macedonia's four main political parties aimed at solving a deep political crisis in the Balkan country.
The crisis emerged after a mass wiretapping scandal erupted in February 2015 and sparked street protests.
Wiretapping allegations led Gruevski to step down in January 2016, after nearly 10 years in power, clearing the way for the election.
In the vote, Gruevski's VMRO-DPMNE party secured 51 seats in the 120-seat parliament, or two more than the main opposition Social Democrats (SDSM).
More From This Section
"We will try to form a government but not at any price," Gruevski told a local paper on Monday.
Following the neck-and-neck election results, ethnic Albanian parties with 20 deputies have emerged as the kingmaker in the former Yugoslav republic.
Their three main parties at the weekend reached a deal over their demands, notably giving Albanian the status of an official language on a national level.
Ethnic Albanians make up around a quarter of Macedonia's population of 2.1 million.
Macedonia aspires to join both the European Union and NATO.
However, accession has been blocked by Athens owing to a dispute over the country's name, as Greece has a northern region also called Macedonia.