The SD and its two centre-left allies, Zares and the Liberal Democrats, are set to together control around 43 seats in the 90-member parliament, while SDS and its present coalition partners will hold 40 seats.
Pahor said: "This is a great achievement for us but we will still have to wait for the official final results by the commission."
Voter turnout was at 62 per cent in the country's fifth parliamentary poll since the former Yugoslav republic attained independence in 1991, according to the electoral commission.
The opposition showed unity in its bid to regain power after four years of centre-right rule.
Jansa and his SDS party had been claiming credit for the country's increased prosperity, but the conservative-led government has also frequently been accused of corruption.
The new government's priority will be to cut overall spending and curb high inflation while keeping the booming economy on track despite a global financial slowdown.
Analysts expect a high degree of political continuity regardless of the outcome, but caution that either party will need partners in the new government and coalition talks could last for weeks or months.
"Things have to change. People in Slovenia can no longer live like this," Matjaz Gabrijelcic, a car salesman, said.
"Inflation is sky high and the average wages are barely enough for people to live on. We need a government whose preoccupation are the little people."
Slovenia joined the European Union in 2004, became a Nato member and was also the first east European state to adopt the Euro in January 2007.
While its economy thrived due to rising exports, inflation rose steadily to reach a six-year high of 6.9 per cent - the highest in the Eurozone.
Unemployment in the country is at six per cent, the highest among the 15 countries which use the Euro currency.