Perhaps it had to end this way.

On the final Sunday of the National League season, a Mexican pitcher is going to take on the entire nation of Canada in a thoroughly American game to see who gets to play a team called the Yankees in the World Series.

Fernando Valenzuela of Los Angeles will face the Montreal Expos here on Sunday at 4 p.m. with a pennant at stake, winner take all.

This afternoon, the blueclads from the Spanish-flavored City of the Angels forced that fifth NL playoff game by beating the Expos, 7-1, with a particularly Dodger-like combination of power, pitching and schmaltzy prayer.

Steve Garvey, Mr. Dodger, provided the power with a two-run homer in the eighth off loser Bill Gullickson, demolishing a 1-1 tie and awakening the Dodgers' drowsy bats. Until then, the crowd of 54,499 was in an emotional lather, fantasizing about the first Series outside American soil.

The pitching came primarily from the Dodgers' Burt (Happy) Hooton who, before this October, had an ugly 6.08 ERA in six postseason starts. After his 7 1/3 victorious innings today, in which he allowed only five singles and one unearned run, Hooton now has won three straight playoff games in '81.

"Happy's the kind of guy who just lives to win big games," said Dodger Manager Tommy Lasorda of the right-hander who has traditionally been the Dodgers' most jittery clutch pitcher.

"My job was to get the team to Fernando," said Hooton, who did.

Also assisting in the Dodger arm department was fast-baller Bob Welch, normally a starter, who was waved onto the scene in the eighth with the Dodgers ahead, 3-1, and two Expos on base with one out. He fanned Larry Parrish, then popped up Friday's hero, Jerry White, to end the Expo party.

By the time the Dodgers had finished sending 10 men to the plate in a four-run ninth inning against three pitchers, more than half of this huge crowd had absconded, leaving the Expos to lick their wounds in silence.

Finally, the Dodgers' element of prayer was provided by Dusty Baker, one of the game's better seldom-sung stars, who gave Lasorda an apropos Biblical quotation to read to the team before what might have been their last game:

"Tribulation brings about perserverence. Perserverence brings about proven character. Proven character is hope. And hope does not disappoint." Romans, Chapter V, Verses 1-5.

"Tomorrow," said Lasorda, thinking of Valenzuela, "I'm going to read it to 'em in Spanish."

Baker followed his own preaching, getting three hits and driving in three runs. His double gave the Dodgers a 1-0 lead in the third and his bases-loaded single in the ninth not only made the score 5-1 but sent 20,000 home in 60 seconds.

The Dodgers also showed their faith in more secular, and perhaps more significant, ways today. Before this game, Dodger brass routinely requested that all players leave their bags in the team's hotel lobby in case they had to return to Los Angeles tonight.

"Not one player checked out of the hotel," said Rick Monday, "and a lot of us veterans didn't even take our bags out of our rooms. We just aren't ready to go home yet."

Baker went one step further in the positive thinking vein. He booked his room here through Sunday, made a plane reservation to New York for Monday and made arrangements to attend the first two games of the World Series in New York whether or not his teammates were there with him.

"I'm going to the World Series," said Baker.

Then, he added, "When the (Houston) Astros had to beat us one game in three in L.A. to win the miniseries, they checked out of the hotel each day. And each day, we'd win and they have to check back in again. That had to bother them. You can't let little negatives get in the back of your mind."

The big "negative" that will lurk in Montreal minds is a crucial second-guess of novice Manager Jim Fanning, who sometimes makes decisions more from the heart than the head.

In the bottom of the seventh, score still tied, 1-1, Fanning had a logical opportunity to pinch hit for the gutty Gullickson, who had had a tough afternoon. Gullickson had left Dodgers stranded in scoring position in five of the first seven innings. "Every inning was a struggle," he said. "I thought I might have been pinch hit for in the seventh."

In fact, if it hadn't been for Dodger rookie Pedro Guerrero, who has been a sort of Expo 10th man in the two days here -- going zero for seven, grounding into three double plays and failing to advance any of nine base runners -- Gullickson might have been shelled to the showers early.

Nevertheless, Fanning, despite having bullpen reports that ace Jeff Reardon was "warmed up and feeling good," left Gullickson in.

"Oh, I had the same stuff in the eighth inning that I had in the first," said Gullickson, cavalierly. "Nothing."

What Gullickson didn't have anymore, and what Fanning may have forgotten, was Olympic Stadium's famous contrasting shadows and awful, bright background.

"Until the late innings it was almost impossible to hit out there," said Monday. "It's like trying to return Bjorn Borg's serve in a closet with the light out. I'd listen for a good strike, then swing at the next one."

By the eighth, the shadows had engulfed the whole park, a vast improvement.

But not for Gullickson. With one out, the roof caved. Baker singled hard to left. That eerie mood of premonition was afoot, as though some large bear trap had been set in the woods and the Expos, after wending their way through the whole forest, were about to step into it. Garvey felt it, too. "I was looking for a slider and I was trying to hit it out of the park," he said bluntly.

It was. And he did.

Before Garvey's blast had landed in the seats in the left field corner, minds were already turning toward Sunday. "When we were scoring in the ninth," said Baker, "we were saying on the bench that we were just building momentum for Sunday."

"It's 'if' time, again . . . if, if, if," said Reggie Smith, who, along with Ron Cey had an RBI hit during Dodger mop-up time. "Well, if a butterfly didn't have wings, it'd be called a butterwalker. You just can't tell about 'if' time."

It all stands to reason. Tommy Lasorda will be translating Romans into Spanish while 50,000 Canadians are cheering on a team of Americans in French.

Or, as Montreal's Sunday starter, Ray Burris, so eloquently put it tonight, "To me, it's just another game."