PORTLAND, MAINE, FEB. 28 -- Vice President Bush, who maintains a home along the coast here, and neighboring Gov. Michael S. Dukakis of Massachusetts walked away with victories in the Maine caucuses today, but it was Jesse L. Jackson who surprised everyone with a strong second-place finish among the Democrats.

Aides to Bush, who brushed aside an expected challenge from Pat Robertson, said the vice president appeared likely to sweep all 22 Maine delegates to this summer's party convention, and other GOP campaign staffs here agreed.

Robertson, who has scored well in other caucus states, failed to upstage Bush here, and the vice president's supporters were clearly elated at the outcome. "A caucus state is tailor-made for Pat Robertson's style of campaigning," said Ron Kaufman, Bush's New England campaign director. "This was a real strong showing for the vice president."

Jackson said his second-place finish in a state with a black population of less than one percent was a sign that potential supporters who feared he could not win are "growing in confidence," while Dukakis said his victory would boost him on "Super Tuesday."

Robertson's supporters complained that they suffered from an informal alliance between Bush backers and supporters of Senate Minority Leader Robert J. Dole (R-Kan.), who combined forces at some caucuses to deny Robertson the chance to win delegates to the state party convention.

But Maine Gov. John R. McKernan Jr. (R), Bush's chief supporter here, defended the accommodation. "This isn't tiddlywinks," he said. "We're talking about the next president of the United States."

McKernan said party regulars supporting Bush and Dole banded together to protect local party offices, also at stake in the caucuses, from Robertson supporters, many of whom were at odds with the moderate Republican establishment here.

The Republican Party here was not tabulating caucus results, but a survey taken by the Bush campaign showed that with 694 communities reporting and 1,063 state delegates selected, the vice president led with 65 percent; Robertson 14 percent; Dole 8 percent and Rep. Jack Kemp (N.Y.) 1.5 percent, with 12 percent uncommitted.

Jeff Nelson, field director for Robertson, differed with the Bush campaign estimates, but agreed that Bush was likely to win all 22 delegates at stake.

On the Democratic side, with 81 percent of the cities and towns reporting, Dukakis had 42 percent of the state convention delegates elected; Jackson 28 percent; Sen. Paul Simon (Ill.) 4 percent; Rep. Richard A. Gephardt (Mo.) 3 percent; Sen. Albert Gore Jr. (Tenn.) one percent and former senator Gary Hart (Colo.) one percent. Another 21 percent were uncommitted, which cut into Dukakis' margin. These percentages translate most closely to the national convention delegates each candidate is likely to receive.

In the popular vote, however, Jackson's showing was even more impressive. With 81 percent of the towns and cities reporting, Dukakis led with 36 percent of the vote to Jackson's 31 percent, while uncommitted received 23 percent. Jackson did better in the popular vote because he received especially large support in some communities, such as Jay, that were allocated only a small number of state convention delegates.

Jackson said the results showed "that I can get votes from all over the country, that the Jackson support is growing."

Arriving for a fund-raiser with Arab Americans, Jackson said, "The people who wanted to support me and thought it was good but in vain are now growing in their confidence . . . . The message is working."

Jackson, who also took second in the Minnesota caucuses last Tuesday, campaigned only briefly in Maine. He attributed his success to previous visits and his support of workers in the state. Jackson visited striking paper-mill workers in Jay last October and received endorsements from several labor leaders. Earlier this month, he visited University of Maine campuses in Bangor and in Portland, where he drew a standing-room-only audience of enthusiastic supporters.

"Since then, the momentum has really picked up," said Bob Philbrook, Jackson's southern Maine coordinator.

Last week, after Jackson operatives sensed he might do well here, the national staff bought $10,000 worth of television advertising in Maine.

Organizers for rival candidates said they believed Jackson was aided because several other Democratic candidates had faltered.

Dukakis said in a statement tonight: "Today our message continued to shine. Today's victory gives our national campaign another push toward success on Super Tuesday."

David Villarino, Dukakis' Maine campaign manager, said he was pleased with the governor's showing, noting that favorites were defeated here in 1980, when President Carter defeated Sen. Edward M. Kennedy (D-Mass.), and in 1984, when Gary Hart beat Walter F. Mondale.

"This is a tough, independent state," he said. "We've never taken it for granted."

Dukakis visited the state seven times and was the only candidate to advertise regularly on television since the New Hampshire primary. He outspent each of his rivals by at least five-to-one, maintaining offices in four cities in the state and employing a paid staff of more than 20.

To give undecided party regulars an incentive to appear, state House Majority Leader John Diamond organized a movement to support uncommitted slates of delegates.