Labour and the SNP could hammer out coalition deals to work together in some of Scotland's hung councils, both party leaders have said.
Alex Salmond and the Labour leader Johann Lamont left the door open for discussions with all political groups, days after municipal elections in all 32 local authorities.
Most councils ended up with no party in overall control as a result of the single transferable vote form of proportional representation.
It means that deals are under way across the country to determine where power will lie.
Mr Salmond said local parties will be free to determine how they discuss power-sharing.
Appearing with other Scottish party leaders on the BBC's Sunday Politics show, he said: "Our council groups are free to make alliances with any other democratic party.
"Where it's appropriate and good for the people locally, they're absolutely free to do that.
"The circumstances will change from council to council but I think you'll find at the end of the day, the SNP are playing a leading role in many, many councils across Scotland - more than we did last week.
"I'm quite confident we will be in more administrations."
Mr Salmond said his party won the election nationally, gaining most councillors overall and a higher share of first preference votes.
But the SNP did not take Glasgow, its key target, and ended up with fewer seats than Labour in Aberdeen and Edinburgh.
The SNP has a majority in two councils compared with Labour's four.
Ms Lamont, elected overall leader of Scottish Labour late last year, said her party made good gains, including inroads for the first time in Aberdeenshire.
She said: "In this regard I'm the same as the First Minister. We recognise there are different discussions going on across Scotland.
"What I have said and Labour councillors are very clear, that in negotiations we start from first principle."
On whether Labour could do a deal with the SNP, she said: "We certainly could. We have said nothing is off the table."
The tally of councillors compared to 2007 was 424 for the SNP (up 61), 394 for Labour (up 48), 115 for the Tories (down 28), 71 for the Liberal Democrats (down 95), 14 for the Greens (up six), and 200 independents.
Green co-leader Patrick Harvie MSP said: "From my point of view it's simply delightful to know there are so many Green councillors around the country, that means we have the opportunity to be part of those discussions."
He called for a change of tone, adding: "Some of local government has been even worse than the Scottish Parliament is in terms of the big beasts just barking at each other. That's not the way we should have our politics."
Scottish Conservative leader Ruth Davidson said: "We may hold the balance of power in a number of places across the country. We're the biggest party in two areas, we hold the balance of power in three of six cities and in a number of areas.
"My local group leaders are empowered to make the decisions that are best for people on the ground."
Scottish Liberal Democrat leader Willie Rennie saw his party suffer "excruciating" losses at the polls.
He said: "It was a big thumping and we accept that. It was one of the most excruciating experiences on Thursday and Friday to see so many people lost.
"We still have over 70 councillors, many of them in quite significant groups in Fife, Aberdeenshire, the Highlands. In those places we've done pretty well, in Perth and Kinross likewise.
"We're still significant players in parts of the country."
He defended the Lib Dem coalition with the Tories at Westminster, adding: "I got into politics to do what I believe, and I want to do the right things for the UK. A lot of people disagree with us on that.
"I'm not going to suddenly change everything I believe, in our approach, our policy and direction in dealing with the deficit."
More About Local elections 2012
- Scotland’s councillors get back to work as the dust settles on elections
- New coalition in Edinburgh sets out promises for next five years
- SNP fury as Labour and Tories strike coalition deal to run Stirling Council
- Voters go to the polls a week late to elect final three councillors
- Councils in Lothians strike deals after days of negotiations
- Councils across Scotland starting to take shape after days of negotiations
- Negotiations across the Lothians in the wake of local government elections