For days, there were hints of a surprise at the end of tonight's gala performance at the Quebec Grand Theatre.

Perhaps, to celebrate St. Patrick's Day and their shared Irish heritage, President Reagan and Canadian Prime Minister Brian Mulroney would take the stage to cap off their "Shamrock Summit."

From high-level sources, there were teasing hints that perhaps there would be a little skit by the visiting president and his host -- having finished the day's official business on acid rain.

"We don't want to reveal any of that. For now, it's a state secret," a "senior official" was quoted in Saturday's Montreal Gazette about the possible Reagan-Mulroney performance at the end of the nationally televised gala.

The state secret was revealed tonight at the end of the hour-long performance. Reagan and Mulroney, joined by their wives, Nancy and Mila, walked from their box to to the stage and, in the setting of an Irish pub, joined the cast in the final chorus of "When Irish Eyes Are Smiling."

Mulroney did a solo on the closing line, "Sure they'll steal your heart away." Reagan sang with the others but didn't attempt to match the voice of his fellow Irishman.

There wasn't a skit after all, but Reagan and Mulroney seemed to enjoy the show, put on before an audience of 1,800 at Quebec's modern Grand Theatre.

It was an upbeat finale to a day that had been long on celebration of U.S.-Canadian friendship, from a colorful welcoming ceremony by Canada's Royal 22nd Regiment, known as the "Van Doos"; a 21-gun salute; and a dinner with Mulroney and 80 Canadian business and political figures at the Chateau Frontenac hotel.

Tonight's acts were introduced by opera singers Maureen Forrester and Claude Corbeil and impressionist Jean-Guy Moreau.

At the outset, two telephone "hot lines" were brought out on stage, one red for Reagan and the other a blue pay phone for Canada.

In one skit between acts, Forrester answered the red phone. It is the Federal Reserve Board, she said. Chairman Paul Volcker is calling to inform the president of a call from the National Aeronautics and Space Administration.

"The American dollar is climbing so high even NASA has lost track of it," Forrester said.

"Well," said Reagan, played by Moreau, "Call me if interest rates are falling."

The television cameras caught the real Reagan laughing at the scene.

In another, Canada's Marc Garneau, who flew on the NASA space shuttle in October, rose from a cloud of purple vapor to the theme from "The Right Stuff." What is life like on other planets? he was asked.

"It's a little like visiting Ottawa," he quipped, sinking back into the purple cloud.

The entertainment tonight included performances by Les Grands Ballets Canadiens and singers Edith Butler, Michel Lemieux and Geoff Hyslop.

The Famous People Players, a 13-member troupe that includes adults who are mentally handicapped, came from Toronto to perform an unusual act under ultraviolet light. They were dressed in black and manipulated fluorescent puppets. Singer Ginette Reno and a snare drum band were the last act before the final pub scene, which featured the National Tap Dance Company of Canada and 61-year-old John Stanzel, reputedly Canada's oldest professional tap dancer, who did a jig.