The Phillies yesterday finally accomplished what most of baseball assumed had taken place 49 days ago: they eliminated the Pirates and won the National League East Division championship.

The winning pitcher, Randy Lerch, smacked two home runs and Greg Lupzinski and Richie Hebner combined for seven runs batted in during a 10-8 victory that asured the Phils a third straight trip to the playoffs.

Lerch's bat gave the Phils inspiration - and when his arm wilted after five innings, Luzinski's three-run homer provided a lead that was in doubt until Willie Stargell struck out with one gone in the ninth.

Stargell's grand-slam homer had given the Pirates a 4-1 lead in the first inning. But the Bucs seemed to sheathe their sabres after Luzinski's blast and Richie Hebner's three-run double in the eighth.

Hebner had hit a double-play chopper near the plate that was called foul the previous pitch, then laced the ball 10 yards fair in right for a 10-4 Philadelphia lead.

But the Pirates, who had closed an 11 1/2-game Phillie lead Aug. 12 to 1 1/2 games with a doubleheader sweep Friday night, offered one final gasp, dramatic although futile.

It began rather tamely, with catcher Ed Ott and pinch hitter Cito Gaston singling. Then Frank Taveras beat out a bunt McGraw did not move quickly enough to field and the bases were loaded.

Omar Moreno brought in one run with a fielder's-choice grounder to second and quickly stole his 70th base of the season. The Dave Parker singled to score two runs and the Phils suddenly seemed capable of losing their senses for the third straight game.

They had allowed the Pirates to win a doubleheader Friday with a few mental errors and two physical ones during the ninth innings of the games. Now, instead of allowing a run to score and keeping Parker nailed on first, Larry Bowa got greedy.

Bowa was the cutoff man who should not have tried to get the swift Moreno a thome. His hurried throw was wide and Parker hustled to second. McGraw was replaced by Ron Reed and the Pirates had one more mystical moment left.

Bill Robinson hit a soft two-hopper into the hole that trickled off third baseman Mike Schmidt's glove just far enough into center to score Parker with the fourth run of the inning.

And up stepped Stargell, who had hit a three-run homer Friday night in addition to his 11th career grand-stam yesterday. But Reed struck him out and Phill garner followed with an easy grounder to short that ended the game.

"Basically, we didn't lose it," said Pirate Manager Chuck Tanner. "The Phils went out and won it.My heart was beating - and I know theirs was, too."

The Phils thought perhaps they were in for a repeat of what had happened all too often during the season in the fifth inning.Pittsburgh gave them what amounted to five outs, when Taveras made his 38th error of the season and Parker missed Luzinski's catchable fly near the wall. But nobody scored.

Second-guessers leaped on Philadelphia Manager Danny Ozark for not sending someone other than a .154 hitter, Jim Morrison, to pinch hit against Grant Jackson in the fifth.

There was some grumbling when Tanner let lefty Jackson pitch to right-handed Luzinski an inning later, when he had such as Kent Tekulve in the bullpen. Tekulve had struck Luzinski out Friday night.

Still, Jackson had Luzinski one-two before his costly mistake. In truth, Jackson's biggest error came when he made a bad throw to first on a two-out bunt by the batter before Luzinski, Garry Maddox.

"Something like this (having to struggle the final weeks instead of clinching the title early) should help us against the Dodgers," Bowa said. "At least I hope so."

In other National League games, the Chicago Cubs rallied with five eighth-inning runs for a 7-5 win over the New York Mets and Garry Templeton's lead-off triple, his 13th of the season, keyed a three-run first inning and started St. Louis to a 6-1 victory over Montreal.

Atlanta's Phil Niekro was thwarted in his bid for a 20th victory when Cincinnati shut out the Braves, 4-0. Houston defeated San Francisco, 7-4, behind the batting and bunting of Julio Gonzales.