Last October, after building a record of reducing runaway inflation and curbing union wage demands, British Prime Minister James Callaghan was widely expected to cash in on his popularity and call a new election.

Yet although public opinion polls indicated his Labor Party had an even chance of winning such an election, Callaghan, wigh a year to go before it was legally required, decided not to go to the electorate.

Now, following the embarrassment his minority government suffered in last week's home rule referendums in Scotland and Wales, "Sunny Jim" Callaghan is in an unenviable position.

Since last fall, Britain has endured a cold winter of labor discontent filled with nagging if never crippling strikes by everyone from truck, train and ambulance drivers to local and national government workers.

The strikes and the specter of huge wage settlements that might push inflation back toward the 30 percent peak of a few years ago earned Britian bleak headlines around the world and pushed Callaghan and the Labor Party way behind the opposition Conservatives in opinion polls.

Last week, the labor picture brightened as increasing numbers of rubbish collectors, school janitors, hospital porters and other "dirty job" local government workers voted for a wage settlement that would end strikes that had closed schools and left garbage uncollected for weeks in many parts of Britain.

Then negotiators for the coal miners, without even threatening a strike like the one that toppled a Conservative government in 1974, also agreed to a new wage offer from the government. If the settlement is approved by the miners, workers in two other sprawling government-ownded industries -- elecrrical power and the railroads -- are expected to agree to a similar deal without striking.

The pay raises agreed to so far in both private and public indusrries are estimated to average about 12 percent, below the dire predictions earlier this year although they may be high enough to push inflation here above 10 percent.

But Callaghan was unable to take credit for this progress before political disaster struck in Scotland and Wales.

The Labor government was the big loser when its offer of limited home rule was voted down overwhelming in Wales and approved by only a thin majority of the voters who turned out in Scotland, which threw into the lap of Parliament the question of whether Scotland should get an elected assembly as planned.

The Scottish and Welsh natuonalist parties were unable to attract wide support for the elected assemblies, with control over local matters, that they saw as stalking horses for eventual independence from Britain. They did, however, hold onto about 20 percent of the voters in Scotland and Wales, enough to keep their movements going even though the threat of separation has been defused for now.

However, Labor, which had pushed the home rule plans through Parliament to keep Scottish and Welsh nationalist support for its minority government in Parliament, was unable to deliver its votes for home rule in Scotland and Wales.

Because Scotland and Wales are traditional Labor strongholds, offsetting the Conservatives' strength in England, the referendum disaster tended to cofirm the evidence of opinion polls that Labor would lose a national election badly if one were held soon.

Beginning this week, Callaghan will have a tougher time than ever keeping together the very loose coalition of minor party supporters that has kept his government from losing a vote of confidence in Parliament that would force an immediate election.

The 11 Scottish Nationalist members of Parliament have warned that they will defect if Labor does not try to win approval in Parliament for an assembly for Scotland even though the 52 percent majority voting for it in Friday's referendum amounts to just 33 percent of Scotland's total electorate. The three Welsh nationalist members of Parliament, with nothing of their own to fight for now, have signaled that they will probably follow the lead of the Scottish Nationalists.

If Callaghan does what the nationalists demand, he risks losing the vote in Parliament on the Scottish assembly because of opposition in his own party to the home rule plan. If he agrees with those Labor dissidents that the referendum vote in Scotland was too indecisive to force such an important constitutional change, he loses the support of the nationalists.

Meanwhile, the Conservatives, led by Margaret Thatcher, who senses the opportunity to become Britain's first woman prime minister, want to strike now. They have begun sounding out minority parties in an attempt to put together a coalition that would defeat Callaghan and Labor in Parliament and force immediate elections.

The decisive battle may well be fought in the next few weeks on the question of whether Scotland should get its elected assembly. That leaves the most important government change in Scotland since it was merged into Britain by the Act of Union in 1707 a hostage ot British party politics.