The VMRO-DPMNE-dominated coalition of Prime Minister Nikola Gruevski won just over 39 percent of the vote while its main rival, the leftist SDSM grouping, took 33 percent, preliminary results by the state electoral commission showed.
"Macedonia has chosen reforms that we have started... We all dream of Macedonia becoming a member of the European Union," Gruevski told his cheering supporters late Sunday.
News that makes sense
Your trusted source for staying up-to-date with the world around you. Get free daily news updates and analysis, straight to your inbox.
If officially confirmed, that would give Gruevski around 55 deputies in 123-seat parliament, short of the outright majority to form his third government.
Gruevski was expected to invite his junior partner in the incumbent government, the ethnic Albanian Democratic Union of Integration (DUI) -- also tipped to win most of the votes among its community -- to form the new cabinet.
The country's ethnic Albanians, who make up one quarter of the 2.2 million population, insist that joining the EU bloc will help ensure there is no repeat of the inter-ethnic conflict that shook the country a decade ago.
The elections were marked by a relatively high turnout 63.3 percent.
The polls were called a year before the end of Gruevski's second mandate, after the opposition walked out of parliament in January as the authorities froze the bank accounts of the pro-opposition A1 television station during a tax probe of their owner.
Despite failure to win the polls, the SDSM-led coalition has surprised analysts by more than doubling its seats in parliament.
SDSM leader Branko Crvenkovski congratulated his opponents, but vowed that the "fight has just begun."
"Everyone saw what we could do with 18 deputies, you can only assume what we can do with 43. Our time is coming," Crvenkovski said.
Analyst Biljana Vankovska told AFP that Macedonia "is entering a bipolar sphere, a black and white world, with small parties being the biggest losers" in the elections.
"The ruling party has no majority which would ensure it to be comfortable in the parliament," Vankovska said.
And analyst Gordana Siljanovska warned it was "time for the political parties to join forces and work together in the interest of the state."
Macedonia is one of the poorest European countries, with an average salary of about 350 euros (500 dollars) a month while almost one-third of the potential workforce is unemployed.

