The task of meeting Ireland's twin challenges -- rescuing a troubled economy and reviving the dialogue with Britain on the future of Ulster -- seemed almost certain today to pass to a coalition led by former prime minister Garret FitzGerald and his Fine Gael Party.

Results of the country's third general election in 18 months give Fine Gael sufficient seats to take power if, as expected, it can forge a partnership with the left-of-center Labor Party. The loser will be the present prime minister, Charles Haughey, whose Fianna Fail Party won the most seats in parliament, but not enough to form a government.

A Fine Gael-Labor coalition, which would be the fourth between the two parties since World War II, will have a firm parliamentary majority of 10, which is essential to grappling with Ireland's serious problems. The last coalition lasted only seven months and was followed by a similarly weak Haughey administration.

The best outcome for this election, politicians and public agreed, was a decisive enough ballot to assure stability in government. Commenting on the results, the Irish Press said today, "Let us hope there won't be another general election for some time. The country badly needs a period of consolidation and progress on both the economic and northern Ireland fronts."

In contrast to most other countries of Western Europe where parties tend to be divided along left-right ideological lines, the shadings of Ireland's main parties are relatively narrow and grouped around the center. Policy differences on the most important issues are matters of emphasis dating back to party origins in the Irish independence movements of more than 60 years ago, and leaving extra room for lively personality disputes.

FitzGerald, a 56-year-old economist, and the Labor leader, Dick Spring, a 32-year-old lawyer, are both committed to stringent economic austerity measures, as is Haughey. Ireland has one of the highest unemployment rates in Europe, 13.5 percent, coupled with stubborn inflation and a mounting budget deficit. A Fine Gael-Labor government seems bound to raise taxes on some consumer items and hold down government spending, but without some of the cuts in social welfare proposed by Haughey.

Ireland, which until just a few years ago had one of the best growth rates in the West, is not in the same sort of severe difficulty as its larger neighbor, Britain, where many older manufacturing industries appear permanently in decline. Much of Ireland's industry is relatively new, reflecting substantial investment from abroad in the last 20 years. A world-wide economic recovery would have an immediate impact by boosting exports.

However, Ireland has a high birth rate, with about half the population under 25, meaning that the pressure to create new jobs is considerable. This was not hard to do in the country's "boom and bloom" period of the 1960s and 1970s, which also was marked by sharp increases in public spending and borrowing.

FitzGerald and Spring will have to smooth out some differences in their parties' economic positions to reach an alliance, but political analysts said compromises where well within grasp, "in the interests of the country and of taking power," as one observer put it. The Fine Gael will have 70 seats in parliament, six better than its previous total, and Labor will have 16 seats, an increase of two.

Haughey's Fianna Fail, with 75 seats, lost five from the last election. Theoretically, the party could attempt an alliance with Labor, but Spring has said he will not align with Fianna Fail as long as Haughey is the party's leader. Haughey, a feisty 57-year-old, has had an unhappy time in this round as prime minister. Several of his close associates were involved in scandals that never amounted to a great deal yet left a cloud.

His party appeared to be increasingly restive and his relations with British Prime Minister Margaret Thatcher took a nose dive when Ireland refused to go along with European Community sanctions during the Falklands war. Struggling to carry on with an overall minority in parliament, Haughey was unable to take decisive actions, which added to the national sense of drift.

FitzGerald's victory will be particularly welcomed by the British government, which will seek an early opportunity to reopen discussions on ways to ease the tensions and continuing violence in Northern Ireland. Britain is also likely to seek support, without success, for the new Northern Ireland assembly in which the province's Catholic-dominated parties have refused to take part.

During the campaign, FitzGerald called on Britain to make a "radical change" in its policies toward the north and urged consideration of an all-Ireland court system and police. The police idea is considered by many analysts to be especially unlikely because it raises the specter of a British presence in the republic of Ireland, a notion that is anathema to the Irish.

The Northern Ireland problem casts a constant pall over political life here with what the Irish writer James Joyce termed "the nightmare of history." FitzGerald's background points up the island's division: his father was a Catholic from the south and his mother, who became a fervent nationalist, a Protestant from the north.

It would be the hope of every Irish politician to find a way out of the problem, but nothing on the horizon holds out hope for significant headway.

Whatever FitzGerald's approach is toward Ulster, it will have to be secondary to tackling the economic issues, which dominated the campaign.

In Monday's television debate climaxing three weeks of campaigning, FitzGerald said his economic measures would be "designed to do the least harm to the less well off." But he acknowledged that tough measures affecting all people in Ireland will be required to do the job.